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)