My local friendly DBA does not like the idea of allowing profiling on the SQL servers (even non-production ones) due to the impact on performance they have.
Ironically, I'm trying to reduce the need for a whole bunch of SQL queries, and would like to be able to check in a fairly non-invasive manner what queries are being sent over the w...
I am trying to learn ADO.NET to connect with SQL Server ...
I install SQL Server with Visual Studio ....
there is data base called "Northwind" as example with it ...
I am trying to read this database , I wrote this code ...
using System;
using System.Data;
using System.Data.SqlClient;
namespace DataSetReaderFromSQL
{
class Prog...
In my DAL I write queries like this:
using(SQLConnection conn = "connection string here")
{
SQLCommand cmd = new ("sql query", conn);
// execute it blah blah
}
Now it just occurred to me that I am not explicitly closing the SQLCommand object. Now I know the 'using' block will take care of the SQLConnection object, but will thi...
Consider a stored procedure that updates some rows about in 60 seconds without using a transaction. We set ADO.NET's SqlCommand.Timeout to 30 seconds.
SqlCommand.Timeout = 30;
When that timeout occurs at 30 seconds, will the stored procedure continue to run in database server or not? How does the server communicate this to the client...
Bellow is my SQL syntax
CREATE TABLE [dbo].[Security_Module_Info](
[Client_Company_ID] [smallint] NOT NULL,
[Module_ID] [tinyint] NOT NULL,
[Module_Name] [nvarchar](50) NULL,
[Module_Description] [nvarchar](200) NULL,
[Is_Active] [bit] NULL,
[Active_Date] [smalldatetime] NULL,
[Record_Status] [tinyNULL,
[...
I call asynchrounously some stored procedures with BeginExecuteNonQuery and EndExecuteNonQuery (in C#). How can I catch the (defined) exceptions of these stored procedures in the C# program? Or does the try{}catch{} also works for asynchrounous calls?
...
MSDN documenation for DbConnection.GetDBSchema says -
Returns schema information for the data source of this DbConnection using the specified string for the schema name and the specified string array for the restriction values.
Regarding the restriction values
The restrictionValues parameter can supply n depth of values, whi...
so I am connecting a sql database.
I have a asp.net page and when the user selects the dropdownlist for status and selects the value to Closed, Then clicks update ticket button, i need it to take update the Closed_date column in the table.
my table has the column Closed_Date type datetime.
I have a stored procedure that updates that c...
im trying to bind a a sql statement to a datagrid.
having some trouble:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
...
As far as I know, via MARS(Multiple Active Result Sets), we can create several Datareaders on a single DataConnection. Please refer to http://msdn.microsoft.com/en-us/library/yf1a7f4f.aspx.
I am wondering how many DataReaders can be created maximumly?
...
my site show this error
you can also check online it visit only 4 to 5 pages then http://www.pakcarid.com/
System.Data.OleDb.OleDbException: System resource exceeded.
Source Error:
Line 267: OleDbDataAdapter dtt = new OleDbDataAdapter(tot);
Line 268: DataSet dstt = new DataSet();
Line 269: dtt.Fill(ds...
Hello Guys,
Most of you might have known already that godaddy does'nt have any plugins or components to directly connect to the database hosted on their servers to run a sql statement. Godaddy wants the developers to login into their sql management interface and run the queries, which is a time consuming process and more over I personal...
I have a XML file that I need to populate multiple SQL tables, and I was wondering what the best way to do that is. I was thinking dataset, or xslt but I honestly not sure. Here is my generated XML (part of it)
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <!-- Created: 8/3/2010 12:09:15 PM
-->
- <Trip>
- <TripDetail...
When looping through elements it thinks the child node is a table, when it should just be a column. I have most of the code working well, until I the code gets to this part: (all of my code is at the bottom)
new XElement("TBL_Magic_TripCountries", lstCountry.Items
.Cast<ListItem>()
...
Hello,
this is more a theoretical question i asked myself.
I remembered that BinarySearch of an ordered List(Collection in general) is faster than finding Rows with Datatable.Rows.Find or DataTable.FindByPK with a primary key value.
Hence i fill a Datatable from Database in a shared constructor and immediately after that a List(of Int3...
Hello,
I have a project which uses strongly typed datasets.
Let's assume I want to change the database schema of the database used by this application.
I have a table named Country and I want to add a new column named "IsADemocracy" (that's an example) of the SQL Server datatype BIT.
Now, how do I update the strongly typed dataset so ...
I'm having a memory leak issue in a service program that runs SQL scripts and dumps the results out to files. After running queries that produce many result rows, the memory usage of the process goes up by 50+ MB each time and doesn't come down.
Here is the code that opens the connection and retrieves the results:
using (var conn = new...
I have static data in a single table which I must serialize. I have often read that a DataReader is more performant, if you wish to have read-only data that you traverse only once. If you wish to serialize this information however, would a DataTable be better?
...
Hi. I have a DataTable that returns
IDs
,1
,2
,3
,4
,5
,100
,101
I want to convert this to single string value, i.e:
,1,2,3,4,5,100,101
How can i rewrite the following to get a single string
var _values = _tbl.AsEnumerable().Select(x => x);
...
What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET? are they fast?
...