Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


ODBC Problem - Very Urgent

Posted on 2004-04-24
Medium Priority
Last Modified: 2010-05-18
Someone please help me with this. Last Wednesdaywas my deadline and I am still fire fighting with this.
I am having a small asp application that is connecting to oracle 9i DB ( through odbc. This asp page is working fine in windows 2000 professional, but giving error in windows 2000 server.
This is my asp code:

dim conn
dim rs
dim sql
set conn= server.createobject("ADODB.Connection")
set rs= server.createobject("ADODB.Recordset")

conn.ConnectionString = "dsn=qmark;uid=user3;password=password"
    'Opening the connection
    conn.Open ConnectionString

sql="select count(*) from A_QUESTION"

rs.open sql, conn, 1,2

response.write "Total Count : " & rs.recordcount


Here is my error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
/em/sample.asp, line 12

God Bless You, for any assistance.

Question by:venkatraman_r
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 53

Expert Comment

by:Ryan Chong
ID: 10908269
Is your target DSN created on your win2k server? Try test the connection to see whether it's connected to Oracle database.

if conn.state = 0 then
 response.write "Conn Failed (closed)!"
 response.write "Conn success (opened)!"
end if

ConnectionString Resources:

Author Comment

ID: 10908292
I tried..it says "Connection failed"

I included the IUSR_MyMachineName in the administrator group and now i get this error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver for Oracle][oracle]ORA-12514:
TNS: Listener could not resolve service_name given in connect descriptor

Any guess!


LVL 53

Accepted Solution

Ryan Chong earned 750 total points
ID: 10908362
>>TNS: Listener could not resolve service_name given in connect descriptor
Is your Oracle Service Successfully Running on your Server? Make sure the Listener and Service is Running well..

See below PAQ to see whether you can get some clue why the Service won't run..:

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 10908390
Oracle DB and listener is running.

The oracleora92agent service is not running and i am unable to restart it.

Still, I feel it is the listener problem.

The link was not much relevant to my problem i guess.

LVL 53

Expert Comment

by:Ryan Chong
ID: 10908461
So, you need to find DBA the exact problem, try deliver it ASAP.

Sorry, i only experienced in Oracle 8.1.6 (and i think there is a lot difference between Oracle 8i and 9i ?), i might can't help you on this here.


Author Comment

ID: 10908534
I tell you what. The IMUsr_CompName was the issue.
There was a mistake in the TNSName entry. I solved it and now i am in all smiles.

IT WORKED :-))))

LVL 53

Expert Comment

by:Ryan Chong
ID: 10908585
Glad you resolved the problem, did i lead you to solve your problem? If yes please award and close this question, otherwise post a Request at Community Support for refund.


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question