DB connection problems

DB connection problems

am 26.01.2005 17:51:05 von AFace

Hi

I run the following code in an include file to set up my asp connection but
I keep getting an error on the line "myconn.open mydb".
I have tried and re-tried everything I can think of but it's just not
running. The db location is correct and all the files are saved to the
correct folder.

Any help would be thoroughly appreciated.

Thanx

A-Face

<%
Option Explicit
Dim myConn, mydb, rs, rs2, sql
Set myconn = server.createobject("ADODB.connection")
mydb = "DRIVER={Microsoft Access
Driver(*.mdb)};DBQ=e:\Inetpub\wwwroot\sa143\CHIS\CHIS.mdb"
myconn.open mydb
set rs = server.createobject("ADODB.Recordset")
set rs2 = server.createobject("ADODB.Recordset")
%>

Re: DB connection problems

am 26.01.2005 18:07:41 von McKirahan

"A-Face" wrote in message
news:D3ABDBCE-7245-4720-891C-8796FBD7C8EF@microsoft.com...
> Hi
>
> I run the following code in an include file to set up my asp connection
but
> I keep getting an error on the line "myconn.open mydb".
> I have tried and re-tried everything I can think of but it's just not
> running. The db location is correct and all the files are saved to the
> correct folder.
>
> Any help would be thoroughly appreciated.
>
> Thanx
>
> A-Face
>
> <%
> Option Explicit
> Dim myConn, mydb, rs, rs2, sql
> Set myconn = server.createobject("ADODB.connection")
> mydb = "DRIVER={Microsoft Access
> Driver(*.mdb)};DBQ=e:\Inetpub\wwwroot\sa143\CHIS\CHIS.mdb"
> myconn.open mydb
> set rs = server.createobject("ADODB.Recordset")
> set rs2 = server.createobject("ADODB.Recordset")
> %>
>

Remove the period before "open" in "myconn.open mydb".

Re: DB connection problems

am 26.01.2005 20:43:27 von Mark Schupp

and the error message is?
--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"A-Face" wrote in message
news:D3ABDBCE-7245-4720-891C-8796FBD7C8EF@microsoft.com...
> Hi
>
> I run the following code in an include file to set up my asp connection
> but
> I keep getting an error on the line "myconn.open mydb".
> I have tried and re-tried everything I can think of but it's just not
> running. The db location is correct and all the files are saved to the
> correct folder.
>
> Any help would be thoroughly appreciated.
>
> Thanx
>
> A-Face
>
> <%
> Option Explicit
> Dim myConn, mydb, rs, rs2, sql
> Set myconn = server.createobject("ADODB.connection")
> mydb = "DRIVER={Microsoft Access
> Driver(*.mdb)};DBQ=e:\Inetpub\wwwroot\sa143\CHIS\CHIS.mdb"
> myconn.open mydb
> set rs = server.createobject("ADODB.Recordset")
> set rs2 = server.createobject("ADODB.Recordset")
> %>
>

Re: DB connection problems

am 26.01.2005 21:27:02 von AFace

Yeah, that would probably help wouldn't it? :) This is what I am currently
getting:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/sa143/chis/connectasp.asp, line 6


"Mark Schupp" wrote:

> and the error message is?
> --
> --Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
> "A-Face" wrote in message
> news:D3ABDBCE-7245-4720-891C-8796FBD7C8EF@microsoft.com...
> > Hi
> >
> > I run the following code in an include file to set up my asp connection
> > but
> > I keep getting an error on the line "myconn.open mydb".
> > I have tried and re-tried everything I can think of but it's just not
> > running. The db location is correct and all the files are saved to the
> > correct folder.
> >
> > Any help would be thoroughly appreciated.
> >
> > Thanx
> >
> > A-Face
> >
> > <%
> > Option Explicit
> > Dim myConn, mydb, rs, rs2, sql
> > Set myconn = server.createobject("ADODB.connection")
> > mydb = "DRIVER={Microsoft Access
> > Driver(*.mdb)};DBQ=e:\Inetpub\wwwroot\sa143\CHIS\CHIS.mdb"
> > myconn.open mydb
> > set rs = server.createobject("ADODB.Recordset")
> > set rs2 = server.createobject("ADODB.Recordset")
> > %>
> >
>
>
>
>

Re: DB connection problems

am 26.01.2005 21:37:10 von AFace

I've taken out the . so the line is now "myconn open mydb" but I'm now met
with the error:

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/sa143/chis/connectasp.asp, line 6, column 12

It seems as if the error might have moved position but I'm not too sure?

"McKirahan" wrote:

> "A-Face" wrote in message
> news:D3ABDBCE-7245-4720-891C-8796FBD7C8EF@microsoft.com...
> > Hi
> >
> > I run the following code in an include file to set up my asp connection
> but
> > I keep getting an error on the line "myconn.open mydb".
> > I have tried and re-tried everything I can think of but it's just not
> > running. The db location is correct and all the files are saved to the
> > correct folder.
> >
> > Any help would be thoroughly appreciated.
> >
> > Thanx
> >
> > A-Face
> >
> > <%
> > Option Explicit
> > Dim myConn, mydb, rs, rs2, sql
> > Set myconn = server.createobject("ADODB.connection")
> > mydb = "DRIVER={Microsoft Access
> > Driver(*.mdb)};DBQ=e:\Inetpub\wwwroot\sa143\CHIS\CHIS.mdb"
> > myconn.open mydb
> > set rs = server.createobject("ADODB.Recordset")
> > set rs2 = server.createobject("ADODB.Recordset")
> > %>
> >
>
> Remove the period before "open" in "myconn.open mydb".
>
>
>

Re: DB connection problems

am 26.01.2005 21:47:59 von Mark Schupp

Usually indicates a permission problem. Here are some things to check:

http://www.aspfaq.com/show.asp?id=2009

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"A-Face" wrote in message
news:ACA8B342-A891-4193-A546-D3A5A3FCE451@microsoft.com...
> Yeah, that would probably help wouldn't it? :) This is what I am currently
> getting:
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
> [Microsoft][ODBC Driver Manager] Data source name not found and no default
> driver specified
> /sa143/chis/connectasp.asp, line 6
>
>
> "Mark Schupp" wrote:
>
>> and the error message is?
>> --
>> --Mark Schupp
>> Head of Development
>> Integrity eLearning
>> www.ielearning.com
>>
>> "A-Face" wrote in message
>> news:D3ABDBCE-7245-4720-891C-8796FBD7C8EF@microsoft.com...
>> > Hi
>> >
>> > I run the following code in an include file to set up my asp connection
>> > but
>> > I keep getting an error on the line "myconn.open mydb".
>> > I have tried and re-tried everything I can think of but it's just not
>> > running. The db location is correct and all the files are saved to the
>> > correct folder.
>> >
>> > Any help would be thoroughly appreciated.
>> >
>> > Thanx
>> >
>> > A-Face
>> >
>> > <%
>> > Option Explicit
>> > Dim myConn, mydb, rs, rs2, sql
>> > Set myconn = server.createobject("ADODB.connection")
>> > mydb = "DRIVER={Microsoft Access
>> > Driver(*.mdb)};DBQ=e:\Inetpub\wwwroot\sa143\CHIS\CHIS.mdb"
>> > myconn.open mydb
>> > set rs = server.createobject("ADODB.Recordset")
>> > set rs2 = server.createobject("ADODB.Recordset")
>> > %>
>> >
>>
>>
>>
>>