SqlDbType not Found using VB.NET (compact framework)

  • Thread starter Thread starter Brett Miller
  • Start date Start date
B

Brett Miller

I am trying to populate a table in a table in a database I have created
using parameters. The following line doesn't work.

cmd.Parameters.Add(New SqlCeParameter("CUniq", SqlDbType.Shortint))

due to the fact that SqlDbType is not found. (not declared)

I have the following imports.
Imports System.IO

Imports System.Data.SqlServerCe

Imports System.Data.Common

Imports System.Data

The documentation says that SqlDbType enumeration is a member of the
System.Data namespace, but I can't find in the tab completion.

Please, any explanation or commentary is very appreciated...

Regards,

BM
 
This Enumeration is in the System.Data.Common.dll assembly. Ensure you have
this added as a reference to your project in addition to the Imports
statements you have already. System.Data.dll is added by default to new
forms application projects but System.Data.Common.dll is not.

Peter
 
Back
Top