sqlDBType.Int32

  • Thread starter Thread starter Rodrigo
  • Start date Start date
R

Rodrigo

Dears,

I'm trying to get a return value of a stored procedure in VB.NET. The
follwoing code is not being recognized.
prspGetCompra = spGetCompra.Parameters.Add("@iHOSPEDE", sqlDBType.Int32)

The .NET sent me the message :

"Name 'sqlDBType' is not declared"

I have declares the namespace System.Data on my form but the problem keep
the same.

tks

Rodrigo.
 
Hi Rodrigo,

Try with
prspGetCompra = spGetCompra.Parameters.Add("@iHOSPEDE", SqlDbType.Int)

Int32 is not a SqlDbType..
 
Dear Miha,

I've tryed this tip but the compiler still send the message "Name
'sqlDBType' is not declared" and underline the word sqlDBType.

I think the problem is about name space, but the on line help say that the
Namespace of sqlDBType is System.Data and I've already put it on my imports
declaration.

I hope you can help me.

Thanks.
 
Expand Solution node then expand References node in Solution Explorer (the
window that shows you the solution).
Under the References node are listed all referenced assemblies.
If there is no System.Data.dll listed right click on References, choose Add
Reference, pick System.Data.dll, click Select and click OK.

HTH,
 
Under References node there are the following list:

- System
- System.Data
- System.Data.SqlClient
- System.Data.SqlServerCe
- System.Drawing
- System.Windows.Forms
- System.Windows.Forms.DataGrid
- System.XML

Is it correct?

I can send the full source code if it help.

Thanks
 
Hi Rodrigo,

Rodrigo said:
Under References node there are the following list:

- System
- System.Data
- System.Data.SqlClient
- System.Data.SqlServerCe
- System.Drawing
- System.Windows.Forms
- System.Windows.Forms.DataGrid
- System.XML

Is it correct?
Yes.

I can send the full source code if it help.

Send it to my e-mail below.
 
Dear Miha,

I've found a difference between my application and yours.

My project is a Smart Device application and your project is a Windows
application.

Is it possible that this detail is the reason of my problem?

Rodrigo.
 
Hi Rodrigo,

Hmm it is possible though the documentation says "supported on .NET compact
framework".
 
Hi Rodrigo,

Bingo, it is defined in System.Data.Common assembly - reference it to your
project and it should work.
 
You are the MASTER,

Thank you for your help.

I'll send you a copy of the application when a finish it.


Rodrigo.
 
Back
Top