Link to home
Start Free TrialLog in
Avatar of Mitch Swetsky
Mitch SwetskyFlag for United States of America

asked on

I am having trouble Adding new record to Oracle Db from ASP

I have a DSN set up and that works fine when tested from ODBC connections.
I am new to oracle connections and I usually insert or add to SQL Server or Access DBs.

I copied the DSN style connection code that I use for my SQL sites and tried to modify it.
I get the following error  At the ststement line:  objInterfaceDBConn.Open ConnectString

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

Can someone help?
' Create the Connection Object
Set objInterfaceDBConn = CreateObject("ADODB.Connection")

ConnectString = "Driver={Microsoft ODBC for Oracle}
;DSN=ONEVUEXG;Uid=DATA;Pwd=data_admin;Database=DATA;"

objInterfaceDBConn.Open ConnectString
	
' Define Schedule Record Set	
Set rs = Server.CreateObject("ADODB.Recordset")           
strSQL = "SELECT * FROM ICSS_LOG_DATA"
rs.Open strSQL, objInterfaceDBConn,3,3

rs.AddNew
rs("ICSS__LOG_NO")		= Log_ID
rs("SERIAL_NO")		= Serial_number
rs("LOG_CREATE_DATE") 	= Created
rs("ORIGINATOR")		= Assigned_emp_name
rs("CUSTOMER_NAME")	= Customer
rs("LOG_SUBJECT")		= Subject& " " &Subject2 
rs("CALL_HISTORY")		= CallHist
rs("EMPLOYEE_NO")		= VarMailto
rs.Update

Open in new window

Avatar of ajexpert
ajexpert
Flag of United States of America image

Do you want to connect only with DSN?

Using DSN Less connection you can try with either of the links

Microsoft ODBC for Oracle
http://www.connectionstrings.com/oracle#p17


Microsoft ODBC Driver for Oracle
http://www.connectionstrings.com/oracle#p18
Using ODBC you can try

ConnectString = "DSN=ONEVUEXG;Uid=DATA;Pwd=data_admin"


Avatar of Mitch Swetsky

ASKER

ajexpert
Thanks for your suggestion
To clarify
I only want to connect with the DSN and would like a sample of my script modified.
Your second suggestion gave me an error
Specified driver could not be loaded due to system error 127 (Oracle in OraClient10g_home1).
/escalate/Get_ICSS_Log.asp, line 198

I don't have much experience and can continue to try but I get different errors that I don't understand.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

I can't read the link above so I apologize if it's a dupe:

When you installed the Oracle client did you add the ODBC drivers?
I have installed the full administrator package for Oracle 10.2.
In the ODBC connections window the connectiion tests successfully.
Th linked article did not help me resolve my issue
Are there any other Oracle clients installed on that machine?

It's a long shot but check the PATH and make sure the 10g ORACLE_HOME/bin is first:

http://www.orafaq.com/forum/t/20729/2/
Thanks, The Path looks correct
Ok running on empty here.  I cannot find anything specific for this.

Do you have more than one Oracle install?

It's not specific to ASP but I found this obscure reference:
http://www.zidsoft.com/dbmsnotes.html

SQLState: IM003.  Specified driver could not be loaded due to system error 127 (Oracle in XE)

You attempted connect to an Oracle Database 10g Express Edition but you are already connected to another Oracle database using a different driver that has the same dll name as the Oracle 10g Express Edition driver dll (SQORA32.dll).
ASKER CERTIFIED SOLUTION
Avatar of Mitch Swetsky
Mitch Swetsky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Changing the connection type to  Provider=msdaora resolved my problem