error with 'SqlDbType' all the sudden, without changing/was working...

T

trint

This code was working just fine and all of the sudden, I get this
error on 'SqlDbType':
"The name 'SqlDbType' does not exist in the current context"

Here is the code where it happens:

conn = new SqlConnection(strconnection);
cmd = new SqlCommand(strsqlinsert, conn);
cmd.Parameters.Add("@user_id",
SqlDbType.Int).Value = Class1.loginUserid.Trim();

Any help is appreciated.
Thanks,
Trint
 
T

trint

This code was working just fine and all of the sudden, I get this
error on 'SqlDbType':
"The name 'SqlDbType' does not exist in the current context"

Here is the code where it happens:

conn = new SqlConnection(strconnection);
cmd = new SqlCommand(strsqlinsert, conn);
cmd.Parameters.Add("@user_id",
SqlDbType.Int).Value = Class1.loginUserid.Trim();

Any help is appreciated.
Thanks,
Trint

Here was the fix:

using System.Data;

Thanks,
Trint
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top