|
 |
aspx_beginners thread: Compiler Error Message - Type is not defined: 'SQLConnection'
Message #1 by "Phil Steel" <philips@t...> on Thu, 21 Jun 2001 16:10:43
|
|
Whenever I try and connect to a database to return a simple recordset, I
get this error:
Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
Source Error:
Line 14: Dim DS As DataSet
Line 15: Dim MyConnection As SQLConnection
Line 16: Dim MyCommand As SQLDataSetCommand
This happens although I have this code at the top of my page:
<%@Import Namespace="System.Web.Util" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQL" %>
Ca anyone help please?
Thanks
Phil
Message #2 by "Chinnathampi, Jesudas" <jesudas_chinnathampi@r...> on Thu, 21 Jun 2001 11:29:41 -0400
|
|
change your code as follows. (do not leave blank space after the @
sign)
<%@Import Namespace=3D"System.Data" %>
<%@Import Namespace=3D"System.Data.SQL" %>
-----Original Message-----
From: Phil Steel [mailto:philips@t...]
Sent: Thursday, June 21, 2001 12:11 PM
To: aspx_beginners
Subject: [aspx_beginners] Compiler Error Message - Type is not defined:
'SQLConnection'
Whenever I try and connect to a database to return a simple recordset,
I
get this error:
Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
Source Error:
Line 14: Dim DS As DataSet
Line 15: Dim MyConnection As SQLConnection
Line 16: Dim MyCommand As SQLDataSetCommand
This happens although I have this code at the top of my page:
<%@Import Namespace=3D"System.Web.Util" %>
<%@ Import Namespace=3D"System.Data" %>
<%@ Import Namespace=3D"System.Data.SQL" %>
Ca anyone help please?
Thanks
Phil
Message #3 by "Phil Steel" <philips@t...> on Thu, 21 Jun 2001 17:15:20
|
|
Hi
This unfortunately makes no difference at all.
I also changed System.Data.SQL to Sytem.Data.SQLClient for the Beta 2.
Any other ideas?
Cheers
Phil
> change your code as follows. (do not leave blank space after the @
> sign)
>
> <%@Import Namespace=3D"System.Data" %>
> <%@Import Namespace=3D"System.Data.SQL" %>
>
> -----Original Message-----
> From: Phil Steel [mailto:philips@t...]
> Sent: Thursday, June 21, 2001 12:11 PM
> To: aspx_beginners
> Subject: [aspx_beginners] Compiler Error Message - Type is not defined:
> 'SQLConnection'
>
>
> Whenever I try and connect to a database to return a simple recordset,
> I
> get this error:
>
> Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
> Source Error:
>
> Line 14: Dim DS As DataSet
> Line 15: Dim MyConnection As SQLConnection
> Line 16: Dim MyCommand As SQLDataSetCommand
>
> This happens although I have this code at the top of my page:
> <%@Import Namespace=3D"System.Web.Util" %>
> <%@ Import Namespace=3D"System.Data" %>
> <%@ Import Namespace=3D"System.Data.SQL" %>
>
> Ca anyone help please?
>
> Thanks
> Phil
>
Message #4 by Ken Davis <kendavis@m...> on Thu, 21 Jun 2001 12:38:48 -0400
|
|
Hi Phil,
Is it case sensitive aspx? In C# it is, try System.Data.SqlClient.
Ken
At 05:15 PM 6/21/2001 +0000, you wrote:
>Hi
>
>This unfortunately makes no difference at all.
>I also changed System.Data.SQL to Sytem.Data.SQLClient for the Beta 2.
>
>Any other ideas?
>
>Cheers
>
>Phil
>
> > change your code as follows. (do not leave blank space after the @ =3D
> > sign)
> >
> > <%@Import Namespace=3D3D"System.Data" %>
> > <%@Import Namespace=3D3D"System.Data.SQL" %>
> >
> > -----Original Message-----
> > From: Phil Steel [mailto:philips@t...]
> > Sent: Thursday, June 21, 2001 12:11 PM
> > To: aspx_beginners
> > Subject: [aspx_beginners] Compiler Error Message - Type is not defined:
> > 'SQLConnection'
> >
> >
> > Whenever I try and connect to a database to return a simple recordset,
=3D
> > I=3D20
> > get this error:
> >
> > Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
> > Source Error:
> >
> > Line 14: Dim DS As DataSet
> > Line 15: Dim MyConnection As SQLConnection
> > Line 16: Dim MyCommand As SQLDataSetCommand
> >
> > This happens although I have this code at the top of my page:
> > <%@Import Namespace=3D3D"System.Web.Util" %>
> > <%@ Import Namespace=3D3D"System.Data" %>
> > <%@ Import Namespace=3D3D"System.Data.SQL" %>
> >
> > Ca anyone help please?
> >
> > Thanks
> > Phil
> >
-----
10 Digit Technology
www.10digittech.com
kendavis@1...
Message #5 by "Chris Sano" <t-csano@m...> on Thu, 21 Jun 2001 11:25:59 -0700
|
|
It looks like you might be using beta2, and if so, the correct namespace
is system.data.sqlClient.
-----Original Message-----
From: Phil Steel [mailto:philips@t...]
Sent: Thursday, June 21, 2001 9:11 AM
To: aspx_beginners
Subject: [aspx_beginners] Compiler Error Message - Type is not defined:
'SQLConnection'
Whenever I try and connect to a database to return a simple recordset, I
get this error:
Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
Source Error:
Line 14: Dim DS As DataSet
Line 15: Dim MyConnection As SQLConnection
Line 16: Dim MyCommand As SQLDataSetCommand
This happens although I have this code at the top of my page:
<%@Import Namespace=3D"System.Web.Util" %>
<%@ Import Namespace=3D"System.Data" %>
<%@ Import Namespace=3D"System.Data.SQL" %>
Ca anyone help please?
Thanks
Phil
Message #6 by "Chris Sano" <t-csano@m...> on Thu, 21 Jun 2001 13:35:25 -0700
|
|
Space does not make a difference here.
It can be written as <%@ import namespace=3D"system.data" %> and
will
still work.
The most important thing is that the <%@ precedes the import command and
%> succeeds the namespace.
-----Original Message-----
From: Chinnathampi, Jesudas [mailto:jesudas_chinnathampi@r...]
Sent: Thursday, June 21, 2001 8:30 AM
To: aspx_beginners
Subject: [aspx_beginners] RE: Compiler Error Message - Type is not
defined : 'SQLConnection'
change your code as follows. (do not leave blank space after the @ sign)
<%@Import Namespace=3D"System.Data" %>
<%@Import Namespace=3D"System.Data.SQL" %>
-----Original Message-----
From: Phil Steel [mailto:philips@t...]
Sent: Thursday, June 21, 2001 12:11 PM
To: aspx_beginners
Subject: [aspx_beginners] Compiler Error Message - Type is not defined:
'SQLConnection'
Whenever I try and connect to a database to return a simple recordset, I
get this error:
Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
Source Error:
Line 14: Dim DS As DataSet
Line 15: Dim MyConnection As SQLConnection
Line 16: Dim MyCommand As SQLDataSetCommand
This happens although I have this code at the top of my page:
<%@Import Namespace=3D"System.Web.Util" %>
<%@ Import Namespace=3D"System.Data" %>
<%@ Import Namespace=3D"System.Data.SQL" %>
Ca anyone help please?
Thanks
Phil
Message #7 by "Chinnathampi, Jesudas" <jesudas_chinnathampi@r...> on Thu, 21 Jun 2001 16:40:08 -0400
|
|
Thanks for the information. Thought I didn't tried, it was just a
hunch....
-----Original Message-----
From: Chris Sano [mailto:t-csano@m...]
Sent: Thursday, June 21, 2001 4:35 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Compiler Error Message - Type is not
defined : 'SQLConnection'
Space does not make a difference here.
It can be written as <%@ import namespace=3D"system.data" %> and
will
still work.
The most important thing is that the <%@ precedes the import command
and
%> succeeds the namespace.
Message #8 by "Mitch Denny" <mitch.denny@w...> on Fri, 22 Jun 2001 09:20:04 +1000
|
|
Hi Phil,
I suspect that none of the other responses worked
for you. In the following code I am assuming that
you are running BETA 2:
<%@ Import Namespace=3D"System.Data" %>
<%@ Import Namespace=3D"System.Data.SqlClient %>
<%@ Import Namespace=3D"System.Web.Mail" %>
Now, by way of explaination, in BETA 2 there have
been a few namespace changes, class movements and
class changes. The System.Data.SQL namespace has
been renamed to System.Data.SqlClient. The
functionality that you are probably seeking in
the System.Web.Util namespace can probably now
be found in the System.Web.Mail namespace.
In addition, the SQLConnection class is now named
SqlConnection, and like wise with other classes.
For your reference, the System.Data.ADO namespace
has also been renamed to System.Data.OleDb.
If you aren't already running BETA 2 I suggest
that you upgrade TODAY because working with
BETA 1 is as useful as flogging a dead horse.
To download the BETA 2 SDK point your browser
at the following address (watch for wrapping):
http://msdn.microsoft.com/downloads/default.asp?URL=3D/code/sample.asp?url
=3D/ms
dn-files/027/000/976/msdncompositedoc.xml
Hope this helps.
----------------------------------------
- Mitch Denny
- http://www.warbyte.com
- mitch.denny@w...
- +61 (414) 610-141
-
> -----Original Message-----
> From: Phil Steel [mailto:philips@t...]
> Sent: Thursday, 21 June 2001 16:11
> To: aspx=5Fbeginners
> Subject: [aspx=5Fbeginners] Compiler Error Message - Type is not defined:
> 'SQLConnection'
>
>
> Whenever I try and connect to a database to return a simple recordset, I
> get this error:
>
> Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
> Source Error:
>
> Line 14: Dim DS As DataSet
> Line 15: Dim MyConnection As SQLConnection
> Line 16: Dim MyCommand As SQLDataSetCommand
>
> This happens although I have this code at the top of my page:
> <%@Import Namespace=3D"System.Web.Util" %>
> <%@ Import Namespace=3D"System.Data" %>
> <%@ Import Namespace=3D"System.Data.SQL" %>
>
> Ca anyone help please?
>
> Thanks
> Phil
>
Message #9 by Philip Steel <PhilipS@t...> on Fri, 22 Jun 2001 09:08:00 +0100
|
|
many thanks for your help Mitch - I have just installed .Net
Framework Beta 2, so will give it a go.
Thanks again
Phil
-----Original Message-----
From: Mitch Denny [mailto:mitch.denny@w...]
Sent: 22 June 2001 00:20
To: aspx_beginners
Subject: [aspx_beginners] RE: Compiler Error Message - Type is not
defined: 'SQLConnection'
Hi Phil,
I suspect that none of the other responses worked
for you. In the following code I am assuming that
you are running BETA 2:
<%@ Import Namespace=3D"System.Data" %>
<%@ Import Namespace=3D"System.Data.SqlClient %>
<%@ Import Namespace=3D"System.Web.Mail" %>
Now, by way of explaination, in BETA 2 there have
been a few namespace changes, class movements and
class changes. The System.Data.SQL namespace has
been renamed to System.Data.SqlClient. The
functionality that you are probably seeking in
the System.Web.Util namespace can probably now
be found in the System.Web.Mail namespace.
In addition, the SQLConnection class is now named
SqlConnection, and like wise with other classes.
For your reference, the System.Data.ADO namespace
has also been renamed to System.Data.OleDb.
If you aren't already running BETA 2 I suggest
that you upgrade TODAY because working with
BETA 1 is as useful as flogging a dead horse.
To download the BETA 2 SDK point your browser
at the following address (watch for wrapping):
http://msdn.microsoft.com/downloads/default.asp?URL=3D/code/sample.asp?u
rl=3D/ms
dn-files/027/000/976/msdncompositedoc.xml
Hope this helps.
----------------------------------------
- Mitch Denny
- http://www.warbyte.com
- mitch.denny@w...
- +61 (414) 610-141
-
> -----Original Message-----
> From: Phil Steel [mailto:philips@t...]
> Sent: Thursday, 21 June 2001 16:11
> To: aspx_beginners
> Subject: [aspx_beginners] Compiler Error Message - Type is not
defined:
> 'SQLConnection'
>
>
> Whenever I try and connect to a database to return a simple
recordset, I
> get this error:
>
> Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
> Source Error:
>
> Line 14: Dim DS As DataSet
> Line 15: Dim MyConnection As SQLConnection
> Line 16: Dim MyCommand As SQLDataSetCommand
>
> This happens although I have this code at the top of my page:
> <%@Import Namespace=3D"System.Web.Util" %>
> <%@ Import Namespace=3D"System.Data" %>
> <%@ Import Namespace=3D"System.Data.SQL" %>
>
> Ca anyone help please?
>
> Thanks
> Phil
>
Message #10 by Bora Celik <bora@C...> on Fri, 22 Jun 2001 09:32:54 -0400
|
|
Hi Phil,
I came across the same problem last night with .NET Beta2 and realized that
there is no System.Data.SQL anymore.
So use System.Data.sqlClient instead and SQLConnection is case sensitive so
use 'SqlConnection' instead, wherever needed in your code. And I also
realized SQLDataSetCommand is gone and I stopped there, I got all this info
from .NET Framework documentation. Go to 'System.Data' section in the
documentation and see what's included in it.
Hope this helps a little bit. Isn't it strange they changed a lot of things?
None of my beta1 code works with beta2 , I have to go through and make a lot
of changes I guess.
Bora Celik
Internet Product Manager
Corporate Information Technologies
-------------
A good traveler has no fixed plans and is not intent upon arriving. A good
artist lets his intuition lead him wherever it wants. A good scientist has
freed himself of concepts and keeps his mind open to what is.
-----Original Message-----
From: Phil Steel [mailto:philips@t...]
Sent: Thursday, June 21, 2001 12:11 PM
To: aspx_beginners
Subject: [aspx_beginners] Compiler Error Message - Type is not defined:
Whenever I try and connect to a database to return a simple recordset, I
get this error:
Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
Source Error:
Line 14: Dim DS As DataSet
Line 15: Dim MyConnection As SQLConnection
Line 16: Dim MyCommand As SQLDataSetCommand
This happens although I have this code at the top of my page:
<%@Import Namespace=3D"System.Web.Util" %>
<%@ Import Namespace=3D"System.Data" %>
<%@ Import Namespace=3D"System.Data.SQL" %>
Message #11 by "winmore" <zwinmore@h...> on Thu, 28 Jun 2001 12:40:43 +0200
|
|
looking for .NET
where can i find the installer.
winmore
----- Original Message -----
From: "Bora Celik" <bora@C...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Friday, June 22, 2001 3:32 PM
Subject: [aspx_beginners] Compiler Error Message - Type is not
defined:'SQLConnection'
> Hi Phil,
> I came across the same problem last night with .NET Beta2 and realized
that
> there is no System.Data.SQL anymore.
> So use System.Data.sqlClient instead and SQLConnection is case sensitive
so
> use 'SqlConnection' instead, wherever needed in your code. And I also
> realized SQLDataSetCommand is gone and I stopped there, I got all this
info
> from .NET Framework documentation. Go to 'System.Data' section in the
> documentation and see what's included in it.
> Hope this helps a little bit. Isn't it strange they changed a lot of
things?
> None of my beta1 code works with beta2 , I have to go through and make a
lot
> of changes I guess.
>
> Bora Celik
> Internet Product Manager
> Corporate Information Technologies
> -------------
> A good traveler has no fixed plans and is not intent upon arriving. A good
> artist lets his intuition lead him wherever it wants. A good scientist has
> freed himself of concepts and keeps his mind open to what is.
>
> -----Original Message-----
> From: Phil Steel [mailto:philips@t...]
> Sent: Thursday, June 21, 2001 12:11 PM
> To: aspx_beginners
> Subject: [aspx_beginners] Compiler Error Message - Type is not defined:
>
>
>
> Whenever I try and connect to a database to return a simple recordset, I
>
> get this error:
>
> Compiler Error Message: BC30002: Type is not defined: 'SQLConnection'
> Source Error:
>
> Line 14: Dim DS As DataSet
> Line 15: Dim MyConnection As SQLConnection
> Line 16: Dim MyCommand As SQLDataSetCommand
>
> This happens although I have this code at the top of my page:
> <%@Import Namespace=3D"System.Web.Util" %>
> <%@ Import Namespace=3D"System.Data" %>
> <%@ Import Namespace=3D"System.Data.SQL" %>
>
>
|
|
 |