Running IIS 32-bit Applications on IIS 64-bit

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
mehmastAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
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
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
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
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

mehmastAuthor Commented:
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
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
why do you have two drivers installed? makes me think there could be a conflict somewhere...
0
mehmastAuthor Commented:
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
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
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
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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
Robert SchuttSoftware EngineerCommented:
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
mehmastAuthor Commented:
@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
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Robert SchuttSoftware EngineerCommented:
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
mehmastAuthor Commented:
Thank you for your input, I will take a look into this and get back to you soon.

Regards
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.