sqlDBType.Int32

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.
 
M

Miha Markic

Hi Rodrigo,

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

Int32 is not a SqlDbType..
 
R

Rodrigo

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.
 
M

Miha Markic

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,
 
R

Rodrigo

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
 
M

Miha Markic

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.
 
R

Rodrigo

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.
 
M

Miha Markic

Hi Rodrigo,

Hmm it is possible though the documentation says "supported on .NET compact
framework".
 
M

Miha Markic

Hi Rodrigo,

Bingo, it is defined in System.Data.Common assembly - reference it to your
project and it should work.
 
R

Rodrigo

You are the MASTER,

Thank you for your help.

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


Rodrigo.
 
M

Miha Markic

Rodrigo said:
You are the MASTER,
:)

Thank you for your help.

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

Can you include a pocket PC, also ;-)
 

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