473,503 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

Sep 13 '07 #1
1 2514
On Sep 13, 12:30 pm, trint <trinity.sm...@gmail.comwrote:
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

Sep 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1545
by: Jean-Francois Gagnon | last post by:
Hi, FYI, We were able to fix a problem we had with SQLServer after Hotfix 815495 was installed. Our application, written in VB.NET, with ADO.NET under .NET framework 1.0, would generate an...
2
4329
by: Andante.in.Blue | last post by:
Our Access 97 database is a single-file (non-splitted, pure Access) hosted no a network server, accessed regularly by a handful of users around the office. Until recently (until the Great...
4
2307
by: ron | last post by:
Hi, I have class object that i serialize using the System.Xml.Serialization class. Intermittently the object is not getting serialized correctly, using System.Xml.Serialization classes....
0
2117
by: Roman | last post by:
I'm trying to create the form which would allow data entry to the Client table, as well as modification and deletion of existing data rows. For some reason the DataGrid part of functionality stops...
9
3161
by: Patrick | last post by:
I have an ASP.NET page that searches for someone in the corporate Active Directory. It had been working fine until recently when I changed from Basic Authentication on IIS6 back to Integrated...
3
3097
by: Jerry | last post by:
Well, here is some weirdness. First, I noticed that I have 2 Set keywords (silly me). so I removed the 2nd "Set" but still got a syntax error. Then I removed the Where clause, and now it works...
3
2421
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: Object reference not set to an instance of an...
3
2457
by: Sagar | last post by:
Hi. I am working on a project to migrate a web application from 1.1 to 2.0 Within in the DAL of the application, there is a call to below function that builds a command object for later use. ...
0
1142
by: gamaz | last post by:
Hi I have a web form which is a part of asp.net application. This process updates a row of a table. This works fine. However I needed to add a DueDate field in the form and update the DueDate...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7084
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.