Link to home
Start Free TrialLog in
Avatar of mehmast
mehmast

asked on

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
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

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.

https://www.experts-exchange.com/questions/26805797/ASP-Oracle-Connection-Problem.html
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
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
Avatar of mehmast
mehmast

ASKER

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
why do you have two drivers installed? makes me think there could be a conflict somewhere...
Avatar of mehmast

ASKER

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
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?
SOLUTION
Avatar of Scott Fell
Scott Fell
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
SOLUTION
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
Avatar of mehmast

ASKER

@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.
ASKER CERTIFIED SOLUTION
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
SOLUTION
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
Avatar of mehmast

ASKER

Thank you for your input, I will take a look into this and get back to you soon.

Regards