ado.net Questions
8
Solved
I do not want to split connection strings using string manipulation functions to get Server, Database, Username, and Password.
I read the following link and read the accepted answer, I found that i...
4
Solved
I have a class that is going to execute entity framework based queries. This class is a general class and is DbContext independent class(I mean there is no ssdl or semiliar files). In this class I ...
Landahl asked 12/11, 2014 at 16:16
8
Solved
I'm able to delete, insert and update in my program and I try to do an insert by calling a created stored procedure from my database.
This button insert I made works well.
private void btnAdd_Click...
Aphoristic asked 24/9, 2011 at 23:7
9
Solved
I've been trying to edit my connection string for uploading my website to a server.
I am not really experienced with this. I got this exception: the Keyword not supported: 'server'.
Here is my conn...
Buttonball asked 11/7, 2011 at 7:9
8
Solved
Can I execute multiple queries and return their results executing a SqlCommand just once?
Duel asked 3/10, 2012 at 19:38
7
Solved
I need to update a row in a table, and get a column value from it. I can do this with
UPDATE Items SET Clicks = Clicks + 1 WHERE Id = @Id;
SELECT Name FROM Items WHERE Id = @Id
This generates 2 ...
Nadenenader asked 31/3, 2009 at 12:52
11
Solved
I have a class named Entry declared like this:
class Entry{
string Id {get;set;}
string Name {get;set;}
}
and then a method that will accept multiple such Entry objects for insertion into th...
Infrequency asked 4/6, 2010 at 9:45
6
Solved
As per MSDN, SqlDataReader.GetSchemaTable returns column metadata for the query executed. I am wondering is there a similar method that will give table metadata for the given query? I mean what tab...
5
Solved
I started to use dapper.net a while ago for performance reasons and that I really like the named parameters feature compared to just run ExecuteQuery in LINQ To SQL.
It works great for most queries...
Mouthpart asked 28/3, 2013 at 13:29
1
I have a performance problem on a query which is running in about 4 seconds in SQL Server Management Studio, vs about 80 seconds in c# when iterating through a SqlDataReader.
This query is pretty s...
Menstruum asked 16/3, 2023 at 12:34
3
Our site has been running for a few weeks in Azure without getting this error:
SqlException: Database 'database' on server 'server' is not currently
available. Please retry the connection later...
Obellia asked 21/4, 2014 at 8:13
7
Solved
I want to retrieve a list of all schemas in a given Sql Server database. Using the ADO.NET schema retrieval API, I get a list of all collections but there is no collection for 'Schemas'.
I could tr...
Kaolin asked 15/9, 2010 at 16:14
2
Solved
I came across this answer and I'm interested in implementing the second answer using Fake. Here's another one.
I'm not really understanding all the concepts there and I'm still reading and unders...
2
I am trying to connect to Oracle database from .NET Core 3.1 using ADO.NET, here's my code:
private OracleConnection GetOracleConnection()
{
string conString = "Data Source=Q550.adr.XXXX.com;...
Carpospore asked 27/1, 2020 at 16:52
2
Solved
I have a Stored Procedure which sometimes return an exception after SELECT statement.
For example:
BEGIN TRY
SELECT
EmployeeId,
EmployeeName
FROM dbo.abc
THROW 50000, 'exception occurs here'...
Consol asked 15/2, 2018 at 12:22
47
Solved
All of a sudden I keep getting a MetadataException on instantiating my generated ObjectContext class. The connection string in App.Config looks correct - hasn't changed since last it worked - and I...
Nobby asked 27/3, 2009 at 11:15
7
Solved
My source is in a MySQL database, I've made an update command and now I need to refresh my DataGrid.
MySqlCommand cmd = new MySqlCommand(
"update request set status = " + StatusRequest(value) +
...
Lophobranch asked 4/7, 2012 at 7:51
13
Solved
I'm comparing materialize time between Dapper and ADO.NET and Dapper. Ultimately, Dapper tend to faster than ADO.NET, though the first time a given fetch query was executed is slower than ADO.NET. ...
Brittaniebrittany asked 8/12, 2016 at 13:2
25
Solved
I have the following code:
Using cmd As SqlCommand = Connection.CreateCommand
cmd.CommandText = "UPDATE someTable SET Value = @Value"
cmd.CommandText &= " WHERE Id = @Id"
cmd.Parameters.Add...
6
Solved
I have a procedure, I want to read schema of the procedure. To retrieve view schema I use the query shown here. Same way I want to get schema of stored procedure. How to get it? Plz show some synta...
Invocation asked 28/4, 2011 at 11:26
2
I have a fairly agnostic ADO.NET application that connects to a number of databases and is able to extract the necessary information to run. I have hit a snag with DB2 and how it handles named para...
Tardif asked 5/6, 2014 at 22:0
24
Solved
An ADO.Net application is only sometimes able to connect to another server on the local network. It seems random whether a given connection attempt succeeds or fails. The connection is using a conn...
Apomorphine asked 18/3, 2013 at 23:34
9
Solved
Why am I getting "Unable to find the requested .Net Framework Data Provider" when trying to setup a new datasource in Visual Studio 2010 Professional?
My stats:
Windows 7 64bit 16gig RAM
Visual ...
Stanley asked 29/3, 2012 at 15:17
2
I have a C# method that accepts a clientId (int) and hasPaid (boolean) that represents if the client has paid or not. The MS SQL Server stored procedure expects a BIT value (1 or 0) for the @HasPai...
Bumbailiff asked 25/6, 2015 at 15:53
6
Solved
I have a loop in c# that inserts into a table. pretty basic stuff. Is there something insdie the exception object that's thrown when a unique constraint is violated that i can use to see what the o...
Raucous asked 14/7, 2014 at 15:40
© 2022 - 2024 — McMap. All rights reserved.