Solved

ODBC Problem - Very Urgent

Posted on 2004-04-24
7
1,055 Views
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 (9.2.1.0.1) 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.

Regards,
Venkat.
0
Comment
Question by:venkatraman_r
  • 4
  • 3
7 Comments
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
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)!"
else
 response.write "Conn success (opened)!"
end if
response.end
..

ConnectionString Resources:
http://www.able-consulting.com/ADO_Conn.htm
http://www.connectionstrings.com
0
 

Author Comment

by:venkatraman_r
Comment Utility
Hi,
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!

Thanks,
Venkat.

0
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 250 total points
Comment Utility
>>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..:
http:Q_20949545.html
http:Q_20921439.html

regards
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:venkatraman_r
Comment Utility
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.

Thanks,
Venkat.
0
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
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.

regards
0
 

Author Comment

by:venkatraman_r
Comment Utility
Man
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 :-))))

Regards,
Venkat.
0
 
LVL 49

Expert Comment

by:Ryan Chong
Comment Utility
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.

cheers
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now