0
votes
0answers
22 views

Stored procedure times out in DBML, but is otherwise instant

I've written a simple stored procedure in SQL Server 2008 R2, that executes instantly, when testing in SSMS. However, when I map it to LINQ2SQL (DBML) and execute it there, it times out for some ...
1
vote
1answer
14 views

Retrieve database information from DBML files

I'm working on one project using ASP.Net 4.0 and SQL Server 2012. I have used DBML files for data access layer and Unfortunately, the database is got corrupted due to hard disk crash and not able to ...
1
vote
1answer
38 views

System.Void' is not a valid return type for a mapped stored procedure method

Am trying to execute a pro in SQL-server from LINQ in asp.net. It works fine when I execute the Proc in SQL,but when i try to call it from linq in asp.net it throws the following error "System.Void' ...
1
vote
2answers
42 views

How to ignore LINQ to SQL on unique key?

I insert data with LINQ to SQL on my DB on a table where there is a unique key on 2 columns. When I try to insert a row with this unique key already inserted, I get: Cannot insert duplicate key ...
1
vote
0answers
20 views

Generate stored procedure declarations from dbml file

I have a .net project with Linq to SQL used in data access layer. The project is in development and all the stored procedures in db are added in dbml file. Unfortunately I lost database today, so in ...
2
votes
1answer
77 views

How do I delete a row with a null foreign key using Linq-to-SQL?

I have a table called tblOvrdImpVolsType with two foreign key columns that are both nullable. I'm having trouble deleting a row in this table using Linq-To-SQL when one of the foreign key columns in ...
1
vote
1answer
53 views

Linq to SQL Causes Brittle Coupling to Database

Linq to SQL is truncating a decimal type instead of rounding it. Apparently this is expected behavior. In order to get around this, I'm rounding the value in my C# code. For example, say I have this: ...
3
votes
4answers
72 views

how to ignore the “the” in a product title ASP.NET/SQL

When i return a list of product stating with the letter "A" it obviously returns all products that start with the letter "A". I would also like to return all products that start with the letter "A" ...
-1
votes
1answer
54 views

How to Insert DataTable with values into Database in Linq to sql

I want to save all record exist in a DataTable into my database. I am using Linq-to-SQL in C#. I am using this code: DataTable dt = null; dt = getTable(fl.ToString()); //getting DataTable using ...
0
votes
2answers
63 views

INSERT using LIST into Stored Procedure

I have this stored procedure: CREATE PROCEDURE [RSLinxMonitoring].[InsertFeatures] @Features nvarchar(50), @TotalLicenses int, @LicensesUsed int, @ServerName nvarchar(50) AS SET ...
1
vote
3answers
89 views

Join two tables using linq, and fill a Dictionary of them

I've been searching how to join two tables (Data and DataValues, one to many) and fill a dictionary of type . The records of Data(s) might be thousands (e.g. 500,000 or more) and each Data may have ...
0
votes
1answer
88 views

C# function to cast multiple datarow values as null if dbnull is detected

My Linq-to-SQL program is returning quite a few values from my SQL Server database some of which the values can be null and others not. If the DataTable column is cast as string, this is not an ...
0
votes
0answers
32 views

How to get the result of a CLR stored procedure via LINQ-to-SQL

My database has a CLR stored procedure like this: [SqlProcedure] public static void GetRecords(DateTime day) { using (SqlConnection conn = new SqlConnection("Context connection=true")) { ...
0
votes
1answer
64 views

SQL Server triggers aren't working with Linq to SQL on ASP.NET

My work colleague is making the ASP.NET Web Forms application collecting data. I'm administrating SQL Server database of it. Based on databse he makes objects to Web Forms using Linq to SQL. He wanted ...
0
votes
2answers
274 views

Cannot open user default database. Login failed.for user

I built a windows forms application project and connected a SQL Server database using Linq-to-SQL. Everything worked properly until this error appeared : Cannot open user default database. Login ...

1 2 3 4 5 48
15 30 50 per page