473,513 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SqlDbType is not declared ??

markmcgookin
648 Recognized Expert Contributor
Hi Folks,

I'm writing a VB app in .Net 2003, and I am getting a squiggley blue line error on mouse over (Yes that is a technical term)

saying "SqlDbType is not declared" when I mouse over the following

Expand|Select|Wrap|Line Numbers
  1. cmdInsert.Parameters.Add(New SqlCeParameter("@p1", SqlDbType.NText))
  2.  
but I have imported (what I thought were) the appropriate namespaces

Expand|Select|Wrap|Line Numbers
  1. Imports System
  2. Imports System.IO
  3. Imports System.Data
  4. Imports System.Text
  5. Imports Microsoft.WindowsCE.Forms
  6. Imports System.Data.Common
  7. Imports System.Collections
  8. Imports System.Data.SqlServerCe
  9.  
I thought it would be included in System.Data and System.Data.SqlServerCe, as they are used in another example program I am working in, and it is not showing this error.

Any ideas?
Mar 1 '07 #1
2 1477
Killer42
8,435 Recognized Expert Expert
In the example program which works, you should be able to trace back to the definition of SqlDbType, and check where it resides.
Mar 1 '07 #2
markmcgookin
648 Recognized Expert Contributor
Well I figured it out!

Turned out that my Imports were correct, but my References to the .dll files (in solution explorer) weren't correct, I had to add a reference to System.Data.Common as well as an Include.

Hope this helps someone else with the same problem!
Mar 1 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3104
by: Kenneth | last post by:
Can anyone explain me why it is neccesary to include SqlDbType to the SqlParameter. In every example I see, it is done, but no one explaines why. I have for example a date I want to save into my...
11
4203
by: Vinod I | last post by:
Hi Team, I am having a string as "System.Data.SqlDbType.Int". Now I want to convert this string type to actual type to use with my Command object Parameter Creation. How I will convert this...
1
3649
by: studen77 | last post by:
Thanks to anyone in advance who can help :) Ok, I know this is a far stretch, but what I'm trying to do is to cast a System.object as one of the SqlDbType enumerations (SqlDbType.Int,...
3
3458
by: Brett Kelly | last post by:
Hello all, I'm in a situation where I need to retrieve a member from the System.Data.SqlDbType enumeration knowing only the type name. At this point, I'm just trying to get reflection to...
9
6295
by: Jerome | last post by:
Hi, I keep getting the same compiler error: 'Name 'SqlDbType' is not declared' and I don't know why? I've declared the following: <%@ Page Language="VB" ContentType="text/html"...
2
2225
by: adams114 | last post by:
I am having a strange problem with invalid type casts. I am trying to update a MS SQL Database with a stored procedure. When I setup the parameters collection for the command object I get a invalid...
5
3192
by: Kevin R | last post by:
I'm trying to update a sql database. It's modified Oledb code from an example that did work with an access database. How can I tweak my code to make it work? Thanks in advance. Kevin...
1
3068
by: patrick | last post by:
I have tried using 2 type systems to get this to compile but it still gets the same error: Public MustInherit Class _Applications Private _AppID As System.Decimal Private _AppPosition As...
4
29360
by: Chris Bordeman | last post by:
I have a DataColumn, want to derive the DbType. I can do column.GetType() but that's a system type, not a db type. How do I convert it to the corresponding type? Thanks much! Chris B.
0
7265
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
7171
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...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5692
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
5095
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
4751
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
3240
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...
0
1605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.