parameters.add

J

Jim Hong

When using:

objParameter = objCommand.Parameters.Add("@ResultsID",
SqlDbType.Int)

VS .Net does not recognize "SqlDbType". Yes I have
imported the System.Data.SqlClient namespace.

Does anyone know what i'm doing wrong?
 
S

Steven Bras [MS]

This line works for me:

oCmd.Parameters.Add("Test", SqlDbType.VarChar)

And, when choosing the overload that allows type specification, a list of
sqldbtype enumerators appears in intellisense.

Do you get a squiggly blue line indicating a syntax error?

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
 
J

Jim Hong

Hi Chris, thanks for taking time and reading my posting. Actually, I
imported the System.Data namespace also. Interestingly enough, when i
look into the namespace in Object browser, I don't see "SqlDbType" I see
"DbType" but not SqlDbType. That's why I get the squiggly line under
SqlDbType correct? If so, why does it not show in object brower?

Again, thanks for your time in helping me
- Jim
 
B

Bernie Yaeger

Hi Jim,

Are you on vs .net 2002? I understand sqldbtype is only support on version
1.1 of the framework.

HTH,

Bernie Yaeger
 
S

Steven Bras [MS]

I've looked this up in our case histories, Knowledge Base and internal
solution database and can find nothing. I would recommend removing and
reinstalling the framework if you have not already done so. That's about
all I can think of!

Steven Bras, MCSD
Microsoft Developer Support/Visual Basic WebData

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
 

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

Top