Skip to content Skip to sidebar Skip to footer
Showing posts with the label Sqlcommand

How To Pass Variable Into Sqlcommand Statement And Insert Into Database Table

I'm writing a small program in C# that uses SQL to store values into a database at runtime base… Read more How To Pass Variable Into Sqlcommand Statement And Insert Into Database Table

How Should I Pass A User-defined Type To Sqlparametercollection.addwithvalue?

I have a custom data type called StudentID, which has an implicit conversion to string. When I pass… Read more How Should I Pass A User-defined Type To Sqlparametercollection.addwithvalue?

How Could I Pass Parameter To Sqldataadapter?

I have tried to pass parameter a value, but what it returns is nothing. If I use a simple sql comma… Read more How Could I Pass Parameter To Sqldataadapter?

Why Am I Getting "timeout" And "cannot Find Table 0" And What Preventive Measures Are At My Disposal?

In the answer to a previous question here, I was advised to also ask about this related issue. Once… Read more Why Am I Getting "timeout" And "cannot Find Table 0" And What Preventive Measures Are At My Disposal?

How Do I Solve This Compile Error?

I'm getting this compile error message. How do I solve it? Error 28 'WindowsFormsApplica… Read more How Do I Solve This Compile Error?

Executing Merge Statement Via C# Sqlcommand Not Working

I am making my first attempt at using a temp table and a MERGE statement to update a SQL table via … Read more Executing Merge Statement Via C# Sqlcommand Not Working

Why Does Executereader() Pad Strings With Traling Spaces?

I have two queries: Q1: select name from presidents where country = 'USA' Q2: select 'O… Read more Why Does Executereader() Pad Strings With Traling Spaces?

Sqlcommand (using Statement / Disposing Issue)

Take the following example... Using cn As New SqlConnection(ConnectionString) T… Read more Sqlcommand (using Statement / Disposing Issue)

C# Sqldatareader Execution Statistics And Information

I am creating an automated DB Query Execution Queue, which essentially means I am creating a Queue … Read more C# Sqldatareader Execution Statistics And Information

Insert Date In Dd-mm-yyyy Format

I'm trying to insert date in dd-MM-yyyy format in c#. Query for inserting is SqlCommand cmd_cus… Read more Insert Date In Dd-mm-yyyy Format

Is It Possible To Get The Parsed Text Of A Sqlcommand With Sqlparameters?

What I am trying to do is create some arbitrary sql command with parameters, set the values and typ… Read more Is It Possible To Get The Parsed Text Of A Sqlcommand With Sqlparameters?

Mysql Change Column Name From "group" To "group_code"

I have set a column name to 'group', which turned out to be a reserved word. Now I try to c… Read more Mysql Change Column Name From "group" To "group_code"

Parse Sql Parameters From Commandtext

Is it possible to parse sql parameters from plain commandtext? e.g. //cmdtext = SELECT * FROM AdWo… Read more Parse Sql Parameters From Commandtext

In Java, Send Commands To Another Command-line Program

I am using Java on Windows XP and want to be able to send commands to another program such as telne… Read more In Java, Send Commands To Another Command-line Program

Why Does A Sqlexception Thrown By Sqlcommand.executenonquery Contain All The Prints As Errors?

When I run the following snippet try { using (SqlConnection conn = new SqlConnection('I'm … Read more Why Does A Sqlexception Thrown By Sqlcommand.executenonquery Contain All The Prints As Errors?

Insert User Defined Variables In To The Sql Statements

Hi this is my query SELECT StraightDist FROM StraightLineDistances WHERE (FirstCity='007&… Read more Insert User Defined Variables In To The Sql Statements

SqlCommand (Using Statement / Disposing Issue)

Take the following example... Using cn As New SqlConnection(ConnectionString) T… Read more SqlCommand (Using Statement / Disposing Issue)

Which Pattern Is Better For SqlConnection Object?

Which pattern is better for SqlConnection object? Which is better in performance? Do you offer any … Read more Which Pattern Is Better For SqlConnection Object?