Unspecified error with JET 4.0

Unspecified error with JET 4.0

am 03.11.2004 16:45:13 von Greg

I've tried using this connection string which works fine:

conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\inetpub\clients\awt326\db\db127\store.mdb"
set con = Server.CreateObject("ADODB.Connection")
con.open(conString)



However, I keep getting an unspecified error on the line "set cat =
con.Execute(sqlString,,1)" in the following:

Set cat = Server.CreateObject( "ADODB.Recordset" )
sqlString = "SELECT * FROM categories Order By Position"
set cat = con.Execute(sqlString,,1)



Whereas this works without a problem?!?!

Set welcome = Server.CreateObject( "ADODB.Recordset" )
sqlString = "SELECT * FROM welcome WHERE Key=1"
set welcome = con.Execute(sqlString,,1)



Is it me or are they the same thing, why is one not working?! I've tried
changing the order etc. with no joy!

Greg.

Re: Unspecified error with JET 4.0

am 03.11.2004 16:52:44 von Greg

I've got it, reserved words somewhere... needed square brackets around
something so I just put them around everything and it works?! What's the
reserved word? Position? categories?

Greg

"Greg" wrote in message
news:eu8LXwbwEHA.1192@tk2msftngp13.phx.gbl...
> I've tried using this connection string which works fine:
>
> conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=C:\inetpub\clients\awt326\db\db127\store.mdb"
> set con = Server.CreateObject("ADODB.Connection")
> con.open(conString)
>
>
>
> However, I keep getting an unspecified error on the line "set cat =
> con.Execute(sqlString,,1)" in the following:
>
> Set cat = Server.CreateObject( "ADODB.Recordset" )
> sqlString = "SELECT * FROM categories Order By Position"
> set cat = con.Execute(sqlString,,1)
>
>
>
> Whereas this works without a problem?!?!
>
> Set welcome = Server.CreateObject( "ADODB.Recordset" )
> sqlString = "SELECT * FROM welcome WHERE Key=1"
> set welcome = con.Execute(sqlString,,1)
>
>
>
> Is it me or are they the same thing, why is one not working?! I've tried
> changing the order etc. with no joy!
>
> Greg.
>
>

Re: Unspecified error with JET 4.0

am 03.11.2004 17:05:48 von ten.xoc

http://www.aspfaq.com/2080

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Greg" wrote in message
news:#8SLk0bwEHA.2676@TK2MSFTNGP12.phx.gbl...
> I've got it, reserved words somewhere... needed square brackets around
> something so I just put them around everything and it works?! What's the
> reserved word? Position? categories?
>
> Greg
>
> "Greg" wrote in message
> news:eu8LXwbwEHA.1192@tk2msftngp13.phx.gbl...
> > I've tried using this connection string which works fine:
> >
> > conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> > Source=C:\inetpub\clients\awt326\db\db127\store.mdb"
> > set con = Server.CreateObject("ADODB.Connection")
> > con.open(conString)
> >
> >
> >
> > However, I keep getting an unspecified error on the line "set cat =
> > con.Execute(sqlString,,1)" in the following:
> >
> > Set cat = Server.CreateObject( "ADODB.Recordset" )
> > sqlString = "SELECT * FROM categories Order By Position"
> > set cat = con.Execute(sqlString,,1)
> >
> >
> >
> > Whereas this works without a problem?!?!
> >
> > Set welcome = Server.CreateObject( "ADODB.Recordset" )
> > sqlString = "SELECT * FROM welcome WHERE Key=1"
> > set welcome = con.Execute(sqlString,,1)
> >
> >
> >
> > Is it me or are they the same thing, why is one not working?! I've tried
> > changing the order etc. with no joy!
> >
> > Greg.
> >
> >
>
>