|
 |
asp_database_setup thread: Oracle DB connection error
Message #1 by "Andrey" <ayegorov@s...> on Tue, 18 Jun 2002 16:06:14
|
|
Can somebody help me to resolve this problem.
I'm trying to insert some records into an Oracle DB and I'm getting the
following error:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
Error occurs on line 5 of this script.
<%@ LANGUAGE=VBSCRIPT %>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Connection.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=SERVER_NAME;" & _
"Uid=USERID;" & _
"Pwd=PASSWORD;"
lastname = Request.Form("lastname")
firstname = Request.Form("firstname")
MIDDLENAME = Request.Form("MIDDLENAME")
POSITIONTITLE = Request.Form("POSITIONTITLE")
OFFICESYMBOL = Request.Form("OFFICESYMBOL")
OFFICESYMBOLDESC = Request.Form("OFFICESYMBOLDESC")
BUILDING = Request.Form("BUILDING")
LOCATION = Request.Form("LOCATION")
DATEENTERED = Request.Form("DATEENTERED")
AreaCode = Request.Form("AreaCode")
Prefix = Request.Form("Prefix")
Extension = Request.Form("Extension")
PHONENUMBER = AreaCode & Prefix & Extension
conn.BeginTrans
conn.execute "insert into TABLENAME "& _
"( lastname, firstname, MIDDLENAME, PHONENUMBER, POSITIONTITLE,
OFFICESYMBOL, OFFICESYMBOLDESC, BUILDING, LOCATION, DATEENTERED) " & _
" values (" & _
"'" & lastname & "', " & _
"'" & firstname & "', " & _
"'" & MIDDLENAME & "', " & _
"'" & PHONENUMBER & "', " & _
"'" & POSITIONTITLE & "', " & _
"'" & OFFICESYMBOL & "', " & _
"'" & OFFICESYMBOLDESC & "', " & _
"'" & BUILDING & "', " & _
"'" & LOCATION & "', " & _
"'" & DATEENTERED & "')"
conn.CommitTrans
conn.close
%>
Thanks. Andrey.
Message #2 by "Gerhard Wentink" <data@w...> on Wed, 19 Jun 2002 06:16:50 +0200
|
|
Change line 5 to:
Conn.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=SERVER_NAME;" & _
"Uid=USERID;" & _
"Pwd=PASSWORD;"
Regards,
Gerhard Wentink
>-----Original Message-----
>From: Andrey [mailto:ayegorov@s...]
>Sent: Tuesday, June 18, 2002 4:06 PM
>To: ASP Database Setup
>Subject: [asp_database_setup] Oracle DB connection error
>
>
>Can somebody help me to resolve this problem.
>I'm trying to insert some records into an Oracle DB and I'm
>getting the
>following error:
>Error Type:
>Microsoft VBScript runtime (0x800A01A8)
>Object required: ''
>Error occurs on line 5 of this script.
>
><%@ LANGUAGE=VBSCRIPT %>
><%
>
>Set Conn = Server.CreateObject("ADODB.Connection")
>Connection.Open "Driver={Microsoft ODBC for Oracle};" & _
>"Server=SERVER_NAME;" & _
>"Uid=USERID;" & _
>"Pwd=PASSWORD;"
>
>lastname = Request.Form("lastname")
>firstname = Request.Form("firstname")
>MIDDLENAME = Request.Form("MIDDLENAME")
>POSITIONTITLE = Request.Form("POSITIONTITLE")
>OFFICESYMBOL = Request.Form("OFFICESYMBOL")
>OFFICESYMBOLDESC = Request.Form("OFFICESYMBOLDESC")
>BUILDING = Request.Form("BUILDING")
>LOCATION = Request.Form("LOCATION")
>DATEENTERED = Request.Form("DATEENTERED")
>AreaCode = Request.Form("AreaCode")
>Prefix = Request.Form("Prefix")
>Extension = Request.Form("Extension")
>PHONENUMBER = AreaCode & Prefix & Extension
>
>
>conn.BeginTrans
>
>conn.execute "insert into TABLENAME "& _
>"( lastname, firstname, MIDDLENAME, PHONENUMBER, POSITIONTITLE,
>OFFICESYMBOL, OFFICESYMBOLDESC, BUILDING, LOCATION, DATEENTERED) " & _
>" values (" & _
>"'" & lastname & "', " & _
>"'" & firstname & "', " & _
>"'" & MIDDLENAME & "', " & _
>"'" & PHONENUMBER & "', " & _
>"'" & POSITIONTITLE & "', " & _
>"'" & OFFICESYMBOL & "', " & _
>"'" & OFFICESYMBOLDESC & "', " & _
>"'" & BUILDING & "', " & _
>"'" & LOCATION & "', " & _
>"'" & DATEENTERED & "')"
>
>
>
>conn.CommitTrans
>conn.close
>%>
>Thanks. Andrey.
>
>%%email.unsub%%
>
>
Message #3 by "Bliven, Corinne" <Corinne.Bliven@o...> on Wed, 19 Jun 2002 15:04:25 -0400
|
|
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C217C4.20EFF1E0
Content-Type: text/plain;
charset="iso-8859-1"
in your 5th line you have the following:
Connection.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=SERVER_NAME;" & _
"Uid=USERID;" & _
"Pwd=PASSWORD;"
you should try to replace "Connection" with "Conn" which is the actual
object you have referenced as a connection:
Conn.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=SERVER_NAME;" & _
"Uid=USERID;" & _
"Pwd=PASSWORD;"
hope that works!
-----Original Message-----
From: Andrey [mailto:ayegorov@s...]
Sent: Tuesday, June 18, 2002 12:06 PM
To: ASP Database Setup
Subject: [asp_database_setup] Oracle DB connection error
Can somebody help me to resolve this problem.
I'm trying to insert some records into an Oracle DB and I'm getting the
following error:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
Error occurs on line 5 of this script.
<%@ LANGUAGE=VBSCRIPT %>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Connection.Open "Driver={Microsoft ODBC for Oracle};" & _
"Server=SERVER_NAME;" & _
"Uid=USERID;" & _
"Pwd=PASSWORD;"
lastname = Request.Form("lastname")
firstname = Request.Form("firstname")
MIDDLENAME = Request.Form("MIDDLENAME")
POSITIONTITLE = Request.Form("POSITIONTITLE")
OFFICESYMBOL = Request.Form("OFFICESYMBOL")
OFFICESYMBOLDESC = Request.Form("OFFICESYMBOLDESC")
BUILDING = Request.Form("BUILDING")
LOCATION = Request.Form("LOCATION")
DATEENTERED = Request.Form("DATEENTERED")
AreaCode = Request.Form("AreaCode")
Prefix = Request.Form("Prefix")
Extension = Request.Form("Extension")
PHONENUMBER = AreaCode & Prefix & Extension
conn.BeginTrans
conn.execute "insert into TABLENAME "& _
"( lastname, firstname, MIDDLENAME, PHONENUMBER, POSITIONTITLE,
OFFICESYMBOL, OFFICESYMBOLDESC, BUILDING, LOCATION, DATEENTERED) " & _
" values (" & _
"'" & lastname & "', " & _
"'" & firstname & "', " & _
"'" & MIDDLENAME & "', " & _
"'" & PHONENUMBER & "', " & _
"'" & POSITIONTITLE & "', " & _
"'" & OFFICESYMBOL & "', " & _
"'" & OFFICESYMBOLDESC & "', " & _
"'" & BUILDING & "', " & _
"'" & LOCATION & "', " & _
"'" & DATEENTERED & "')"
conn.CommitTrans
conn.close
%>
Thanks. Andrey.
corinne.bliven@o...
%%email.unsub%%
|
|
 |