Solved

Running IIS 32-bit Applications on IIS 64-bit

Posted on 2014-11-19
15
403 Views
Last Modified: 2015-01-28
Hi,

While running 32 bit IIS application on Windows 64 bit got below error.
ADODB.Connection error '800a0e7a'
Provider cannot be found. It may not be properly installed.

Then I followed some steps below but still no success.

1.      Executed below pre-requisite script to run 32 bit app on 64 bit and I got an error “Service Unavailable” . On setting it to false, revert back to same ADODB.Connection error.

"cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 true"

2.      In 32 bit server I used below connection string in asp forms which works fine. (Data Source= orcllive – System Data Source created using Microsoft ODBC Driver after installing Oracle 10g Client 32-Bit)

data_source = "Provider=MSDAORA.1;User ID=username;Password=password;Data Source=orcllive;Persist Security Info=False"

3.      In 64 bit server I used the same connection string as above to connect to oracle database but it gives me ADODB.Connection error. So, then I used the below connection string which helps to connect to database.
(Data Source= orcllive – System Data Source created using Oracle ODBC Driver after installing Oracle 10g Client 64-Bit)

data_source = "Provider= OraOLEDB.Oracle;User ID=username;Password=password;Data Source=orcllive;Persist Security Info=False"

After connection issue got resolved, now the issue with all the dropdownlist controls on the form which is not displaying all the records, fixed to the first value instead of displaying all the records from the table.

Form.asp

<%@ language="VBScript"%>
<%
Dim sUsername
sUsername = Session("Username")
If sUsername = "" Then
Response.Redirect("itformslogin.asp")
end if
Dim rs, rs1, rs2,rs3,rs4,rs5,rs6, data_source, no, sName, sSQL, sSQL1, sSQL2, sSQL3, sSQL4,sSQL5,sSQL6

data_source = "Provider=OraOLEDB.Oracle;User ID=username;Password=password;Data Source=orcllive; Persist Security Info=False "

sSQL3 = "select * from owf_mgr.branch order by 2”      -- Table Branch with two columns Branch_Code and E_Branch_Name

'For Branch
Set rs3 = Server.CreateObject("ADODB.Recordset")
rs3.Open sSQL3 , data_source

%>
<html>

Open in new window

Under html tags I am using dropdownlist control to display all the branch names.

<td>Branch</td>
                        <td >
                                    <%
                                    response.write "<select name='lstBranch' id='lstBranch' style='width:201px'>"
                                    response.write "<option value='Please select branch'>Please select branch</option>"
                                    while not rs3.eof
                                    response.write "<option value='" & rs3("e_branch_name")& "'>" & rs3("e_branch_name") & "</option>"
                                    rs3.movenext
                                    wend
                                    response.write "</select>"
                                    %>

</html>

Open in new window


On Form Under Branch dropdownlist it shows only first record from the table i.e. only one branch name.

Any help will be highly appreciated.

Regards
0
Comment
Question by:mehmast
[X]
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
  • 4
  • 3
  • +1
15 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40454938
I don't use Oracle myself, but I see one of Oracle Experts comment on not to use the MS drivers to start with and I think you need to use a 32bit app pool.

http://www.experts-exchange.com/Programming/Languages/Scripting/ASP/Q_26805797.html
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40455413
Have you got the driver installed? If you go into Start > Settings > Control Panel > Administrative Tools and click the Data Sources, then select the Drivers tab your driver info should be registered there. Please confirm whether or not it's listed there
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40455425
you may also want to try the following in your connection string

Provider=OraOLEDB.Oracle.1

note the "1" at the end of the line
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:mehmast
ID: 40458406
Hi,

Please find attached the drivers detail. Oracle 10g client has been installed (highlighted one).

I tried updating the provider name with ".1" but still the dropdownlist is displaying only one value.
odbc-drivers.JPG
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40459813
why do you have two drivers installed? makes me think there could be a conflict somewhere...
0
 

Author Comment

by:mehmast
ID: 40461507
As i am working on 64bit OS so i opened the data source administrator window using this command %WINDIR%\SysWow64\odbcad32.exe and attached the updated drivers list.

And i used provider MSDAORA.1 instead of OraOLEDB.Oracle by creating new system data source using Microsoft ODBC driver.

data_source = "Provider= MSDAORA.1;User ID=username;Password=password;Data Source=orcllive;Persist Security Info=False"

But, still dropdownlist is displaying only one record (attached the diff fyr)
Dropdownlist.JPG
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 40491451
i assume you've run the sql directly in the database and have gotten the correct data back?

can you post the latest version of the code you're using, inside the code box to make it easier to read?
0
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 total points
ID: 40491634
You might try using oracle drivers.  One of the Oracle experts has consistently posted in the ASP threads about using only Oracle drivers  http:Q_28465372.html#a40170876

From the accepted answer
I still suggest Oracle Objects for OLE (OO4O)
http://www.oracle.com/technetwork/database/windows/index-094977.html

It is part of the ODAC and can be downloaded from here:
http://www.oracle.com/technetwork/topics/dotnet/downloads/net-downloads-160392.html?ssSourceSiteId=ocomen
0
 
LVL 35

Assisted Solution

by:Robert Schutt
Robert Schutt earned 250 total points
ID: 40493121
I have seen this exact problem but in a different setup. IIRC the problem only arose after we started accessing a 10g database from an 11g client install on a 64 bit web server. The solution was to install patch 8832986 (on the web server) but that's probably not applicable for you. However using that number I found this page, which contains links to patches that could help you:
For 10.2 it's fixed in 10204 Patch 21 { https://support.oracle.com/rs?type=patch&id=21 } and higher.
For 11.1 it's fixed in 11107 Patch 12 { https://support.oracle.com/rs?type=patch&id=12 } and higher.
0
 

Author Comment

by:mehmast
ID: 40498603
@Big Monty, please find below the latest version of the code. Also see the result of the query when i run in database.

select * from owf_mgr.branch order by 2

BRANCH_CODE      E_BRANCH_NAME

26      Abha CCI
63      Abqiq POS
54      Afif CCI
6      Ahsa Branch


===========================================ASP page ===========================================
<%@ language="VBScript"%>

<%
Dim sUsername
sUsername = Session("Username")
If sUsername = "" Then
Response.Redirect("itformslogin.asp")
end if
Dim rs, rs1, rs2,rs3,rs4,rs5,rs6, data_source, no, sName, sSQL, sSQL1, sSQL2, sSQL3, sSQL4,sSQL5,sSQL6

[b]I used Oracle drivers to create DSN with provider id as OraOLEDB.Oracle.1[/b]

data_source = "Provider=OraOLEDB.Oracle.1;User ID=owf_mgr;Password=mcmswf85;Data Source=orcllive"


sUsername = UCase(LTRim(RTrim(Session("Username"))))

'sSQL3 = "select * from tpauser.branch@orcltolive"
'sSQL4 = "select * from tpauser.divisions@orcltolive"
'sSQL5 = "select * from tpauser.sec_job_titels@orcltolive"

sSQL3 = "select * from owf_mgr.branch order by 2"
sSQL4 = "select * from owf_mgr.divisions order by 2"
sSQL5 = "select * from owf_mgr.sec_job_titels order by 2"
sSQL6 = "select * from owf_mgr.emp_type order by 1"
sSQL7 = "select * from owf_mgr.managers order by 1"
sSQL8 = "select * from owf_mgr.partners order by 1"
sSQL9 = "select * from owf_mgr.partner_branches order by 2"



' Creating Recordset Object and opening the database
'For Branch
Set rs3 = Server.CreateObject("ADODB.Recordset")
rs3.Open sSQL3 , data_source

'For Department
Set rs4 = Server.CreateObject("ADODB.Recordset")
rs4.Open sSQL4 , data_source

'For Job Title
Set rs5 = Server.CreateObject("ADODB.Recordset")
rs5.Open sSQL5 , data_source

'For Employee Type
Set rs6 = Server.CreateObject("ADODB.Recordset")
rs6.Open sSQL6 , data_source

'For Managers
Set rs7 = Server.CreateObject("ADODB.Recordset")
rs7.Open sSQL7 , data_source

'For Partners
Set rs8 = Server.CreateObject("ADODB.Recordset")
rs8.Open sSQL8 , data_source

'For Partners Branch
Set rs9 = Server.CreateObject("ADODB.Recordset")
rs9.Open sSQL9 , data_source

<html>
<head>
<script></script>
</head>
<body onload="ClearForm()">

<table>
<tr>
						<td>Branch</td>
                        <td >
						<%
						response.write "<select name='lstBranch' id='lstBranch' style='width:201px'>"
						response.write "<option value='Please select branch'>Please select branch</option>"
						while not rs3.eof
						response.write "<option value='" & rs3("e_branch_name")& "'>" & rs3("e_branch_name") & "</option>"
						rs3.movenext
						wend
						response.write "</select>"
						%>
						</td>
						<td>Department</td>
                        <td>
						<%
						response.write "<select name='lstDivisions' id='lstDivisions' style='width:201px'>"
						response.write "<option value='Please select department'>Please select department</option>"
						while not rs4.eof
						response.write "<option value='" & rs4("division_name")& "'>" & rs4("division_name") & "</option>"
						rs4.movenext
						wend
						response.write "</select>"
						%></td>
                        <td>Job Title</td>
                        <td>
						<%											
						response.write "<select name='lstJobTitle' id='lstJobTitle' style='width:201px'>"
						response.write "<option value='Please select job title'>Please select job title</option>"
						while not rs5.eof
						response.write "<option value='" & rs5("job_title_desc")& "'>" & rs5("job_title_desc") & "</option>"
						rs5.movenext
						wend
						response.write "</select>"
						%></td>
						</tr>
</table>

Open in new window


================================================================================================

When i open the page all of the above dropdownlist is displaying only first record of the table/s.
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 250 total points
ID: 40506838
Instead of while/wend try do/loop

if not rs3.eof then
do until rs3.eof
    response.write "<option value='" & rs3("e_branch_name")& "'>" & rs3("e_branch_name") & "</option>"
rs3.movenext
loop
end if

Open in new window


or send the recordset to an array
' Creating Recordset Object and opening the database
'For Branch
Set rs3 = Server.CreateObject("ADODB.Recordset")
rs3.Open sSQL3 , data_source
Array_3 = rs3.getrows()

'Below where you see field names = Array_3(0,r) ..... Array_3(2,r) 
'the fields have to be listed in the same order as what is being pulled from the db.
'It is a good idea to use select field1,field2,field3 from owf_mgr.branch order by 2
'instead of select * from owf_mgr.branch order by 2
'below assumes e_branch_name is the first field 

response.write "<select name='lstBranch' id='lstBranch' style='width:201px'>"
response.write "<option value='Please select branch'>Please select branch</option>"

if IsArray(Array_3) then

For r = LBound(Array_3, 2) To UBound(Array_3, 2)
	e_branch_name  = Array_3(0, r) 
	field2 = Array_3(1, r) 
        field3 = Array_3(2, r) 

	response.write "<option value='" & rs3("e_branch_name")& "'>" & rs3("e_branch_name") & "</option>"

next
     
else
         response.write "<option value=''>No Data</option>"

end if
response.write "</select>"

Open in new window

The above allows you to reuse the same data over and over without hitting the db.  It can be a lot faster than looping through your db.  See http://www.w3schools.com/asp/met_rs_getrows.asp or http://www.4guysfromrolla.com/aspfaqs/ShowFAQ.asp?FAQID=161
0
 
LVL 35

Assisted Solution

by:Robert Schutt
Robert Schutt earned 250 total points
ID: 40506870
mehmast,

Unless I'm getting senile (a distinct possibility at my age ;) you have not responded to my post (ID: 40493121). If you have checked that the Oracle client install on your web server is at the latest patch level, please let us know. In that case you would indeed seem to have another problem but it seems a bit too coincidental to me. Then again, stranger things have happened. Anyway, just wanna double check with you that you've seen that post. If you do have that same problem, then any attempt to solve this through code changes might be a wild goose chase I'm afraid.
0
 

Author Comment

by:mehmast
ID: 40523413
Thank you for your input, I will take a look into this and get back to you soon.

Regards
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

739 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