Home All Groups Group Topic Archive Search About

VB.NET with ADO.NET compilation error.

Author
29 Mar 2005 2:49 AM
Kam
I am using the command line to create a VB.NET and ADO.NET Application.
But Imports System.Data and Imports System.Data.SqlClient cannot be found
during compliation.

Can anyone show me how to setup the enviroment?

Author
29 Mar 2005 5:48 AM
MeltingPoint
=?Utf-8?B?S2Ft?= <K**@discussions.microsoft.com> wrote in
news:A16E02C5-335E-493E-B2EA-95AAB37EF8F6@microsoft.com:

> I am using the command line to create a VB.NET and ADO.NET
> Application. But Imports System.Data and Imports System.Data.SqlClient
> cannot be found during compliation.
>
> Can anyone show me how to setup the enviroment?
>

It would be helpful to see the command line args your using but since I
can't I'll point out something you might not be aware of,

When compiling from the command line, you must explicitly reference the
Microsoft Visual Basic Run-Time Library through the /reference compiler
option. eg., vbc /reference:Microsoft.VisualBasic.dll MyFile.vb
This article can be found:http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/vblr7/html/vaconvbcompileroptions.asp

If it not working in the IDE then you need to add a reference to them. In
the solution explorer right click on your project and select Add Reference.
In the dialog box select System.Data *I THINK* this needs to be done for
EACH project if its not all ready there.

Let me know,
MP
Author
29 Mar 2005 7:23 AM
Kam
I look at it before, but I don't know how to add the reference under command
line.
Can you give me more information on it?



Show quoteHide quote
"MeltingPoint" wrote:

> =?Utf-8?B?S2Ft?= <K**@discussions.microsoft.com> wrote in
> news:A16E02C5-335E-493E-B2EA-95AAB37EF8F6@microsoft.com:
>
> > I am using the command line to create a VB.NET and ADO.NET
> > Application. But Imports System.Data and Imports System.Data.SqlClient
> > cannot be found during compliation.
> >
> > Can anyone show me how to setup the enviroment?
> >
>
> It would be helpful to see the command line args your using but since I
> can't I'll point out something you might not be aware of,
>
> When compiling from the command line, you must explicitly reference the
> Microsoft Visual Basic Run-Time Library through the /reference compiler
> option. eg., vbc /reference:Microsoft.VisualBasic.dll MyFile.vb
> This article can be found:http://msdn.microsoft.com/library/default.asp?
> url=/library/en-us/vblr7/html/vaconvbcompileroptions.asp
>
> If it not working in the IDE then you need to add a reference to them. In
> the solution explorer right click on your project and select Add Reference.
> In the dialog box select System.Data *I THINK* this needs to be done for
> EACH project if its not all ready there.
>
> Let me know,
> MP
>
Author
29 Mar 2005 7:25 AM
Kam
Especially for ADO.NET, How can I add the reference under command line

Show quoteHide quote
"MeltingPoint" wrote:

> =?Utf-8?B?S2Ft?= <K**@discussions.microsoft.com> wrote in
> news:A16E02C5-335E-493E-B2EA-95AAB37EF8F6@microsoft.com:
>
> > I am using the command line to create a VB.NET and ADO.NET
> > Application. But Imports System.Data and Imports System.Data.SqlClient
> > cannot be found during compliation.
> >
> > Can anyone show me how to setup the enviroment?
> >
>
> It would be helpful to see the command line args your using but since I
> can't I'll point out something you might not be aware of,
>
> When compiling from the command line, you must explicitly reference the
> Microsoft Visual Basic Run-Time Library through the /reference compiler
> option. eg., vbc /reference:Microsoft.VisualBasic.dll MyFile.vb
> This article can be found:http://msdn.microsoft.com/library/default.asp?
> url=/library/en-us/vblr7/html/vaconvbcompileroptions.asp
>
> If it not working in the IDE then you need to add a reference to them. In
> the solution explorer right click on your project and select Add Reference.
> In the dialog box select System.Data *I THINK* this needs to be done for
> EACH project if its not all ready there.
>
> Let me know,
> MP
>
Author
29 Mar 2005 10:22 PM
MeltingPoint
=?Utf-8?B?S2Ft?= <K**@discussions.microsoft.com> wrote in
news:BEDD50E9-478E-4BDC-8855-78DFD593DBD7@microsoft.com:

> Especially for ADO.NET, How can I add the reference under command line

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/vblr7/html/vaconvbcompileroptions.asp

There is no command line for ADO. Your either using vb,c#,c++,j# or some
other language. The article above shows you how to use the command line to
compile with vbc.

You need to include much more info then your previous posts if you want a
good answer. I still don't know if you've even got this program running in
the IDE yet. If not, then problem is there, not the command line.
Otherwise, if it is running in the IDE then yes, you need help at the
command line.

But since I'm not a mind reader...

MP