× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




CWBCFG /?

CA/400 has a executable CWBCFG. This command is used to allow the IIS
service to attach to the AS/400 with ADO. I don't know whether newer
versions of CA/400 have changed this issue but it certainly was required in
the past.

I hope this resolves the issue for you. If not, please post again but I'm
hoping this will do the trick.

Also... I've had to reboot the PC server even though I wasn't instructed to
do so. Good Luck,

Ken Slaugh (707) 795-1512 x118
Chouinard & Myhre, Inc.
CA/400 Certified Specialist
iSeries Network/MSE Administrator
http://www.cm-inc.com/


                                                                                
                                     
                      "Goodbar, Loyd (ETS                                       
                                     
                      - Water Valley)"            To:       
"'midrange-l@xxxxxxxxxxxx'" <midrange-l@xxxxxxxxxxxx>    
                      <LGoodbar@xxxxxxxxxx        cc:                           
                                     
                      .com>                       Subject:  Difficulty with ASP 
and Client Access ODBC driver        
                      Sent by:                                                  
                                     
                      midrange-l-bounces@x                                      
                                     
                      idrange.com                                               
                                     
                                                                                
                                     
                                                                                
                                     
                      08/19/2003 07:25 AM                                       
                                     
                      Please respond to                                         
                                     
                      Midrange Systems                                          
                                     
                      Technical Discussion                                      
                                     
                                                                                
                                     
                                                                                
                                     




Here's the scenario: I have some ASP (classic/3.0) pages that access AS/400
data. Everything works correctly on my machine, running a local
installation
of IIS. I can access remote SQL server data or AS/400 data.

However, when I run the ASP pages on our application server, the ASP page
always "hangs" on the "open connection" line when retrieving AS/400 data. I
have Client Access installed on the application server.
The server can access the SQL server database, but not the AS/400 database.
The web page doesn't time out, but sits there for a very long time (I
stopped timing it after 5 minutes).

The script hangs no matter which type of AS/400 connection I try to use:
DSN: "DSN=mydsn;Uid=uid;Pwd=pwd"
DSN-less: "driver={Client Access ODBC Driver
(32-bit)};system=system;uid=uid;pwd=pwd"

I set up a standalone server running a default install of IIS and Client
Access, and have the same problem. It would appear to me to be a
configuration issue, but I'm not sure what to check.
I'm pretty new to ASP, I think I missed a configuration setting or piece of
client access installation somewhere on the server. All of our servers are
in the same network subnet.

If I need to provide more information, let me know.
Any help appreciated, thanks!

Loyd



Sorry for the long post, but here is the complete sample ASP page that
demonstrates the problem.

<%
option explicit
response.buffer = true
response.clear
server.scripttimeout = 30            ' seconds
%><html>
<head>
<style type="text/css">
<!--
body
{
      background-color: white;
     font-family: veranda,
arial, sans-serif;
}
.false { background-color: #fed; }
.true {
background-color: #dcb; }
// -->
</style>
</head>
<body>
<%
dim mydb, myconn, myrs, mysql, myarray, mycount, myloop
dim mycategoryid, mycategoryname, mycategorydescription, mycategorypicture
dim myfield, myfcount, myfieldloop, flipper

' ******************
' The getdata subroutine will turn any SQL select statement into a table.

' ******************
' SQL Server test

mydb = "driver={sql
server};server=etswvsvsql001;uid=loyd;pwd=loyd;database=PCS"
mysql = "select * from productgroups pg left outer join departments dp on
(dp.pg_id=pg.pg_id) left outer join areas ar on (ar.dept_id=dp.dept_id)
order by pg.pg_sortorder, dp.dept, ar.area_sortorder"

response.write "<b>SQL server test</b><br/>"

call getdata

' SQL server works fine on the app server.

' **********************
' AS/400 test

mydb = "driver={Client Access ODBC Driver
(32-bit)};system=10.121.17.7;uid=loyd;pwd=loyd"
mysql="select * from msdb1t.sts"

response.write "<b>AS/400 test</b><br/>"

call getdata

' End

sub getdata

response.write "Before createobject.<br/>"
response.flush
set myconn = server.createobject("adodb.connection")
response.write "After createobject.<br/>"
response.flush
response.write "Before open connection.<br/>"
response.flush
myconn.open mydb

' ******************* the script always hangs here on AS/400 data retrieval


response.write "After open connection.<br/>"
response.flush

response.write "Before execute.<br/>"
response.flush
set myrs = myconn.execute(mysql)
response.write "After execute.<br/>"
response.flush
if not myrs.eof then
             response.write "Get results.<br/>"
             myarray = myrs.getrows()
             response.write "<table cellspacing=""0"" cellpadding=""3""
frame
rules=""none""><tr>"
             for each myfield in myrs.fields           ' List fields names
in result set
                         response.write "<th>" & myfield.name & "</th>"
             next
             response.write "</tr>" & vbcrlf
             mycount = ubound(myarray,2)         ' Number of rows returned
             myfcount = ubound(myarray,1)        ' Number of fields
returned
             myloop = 0
             flipper = false
             do until myloop = mycount           ' Output each row
                         if myloop mod 5 = 0 then            ' Show
something every 5
rows
                                     if response.isclientconnected() =
false then
                                                 exit do
                                     end if            ' stop script with
cleanup if client
disconnected
                                     response.flush
                         end if            ' myloop mod 5 = 0
                         response.write "<tr class=""" & flipper & """
valign=""top"">"
                         for myfieldloop = 0 to myfcount           ' Output
each field
                                     response.write "<td>"
                                     if isnull(myarray(myfieldloop,myloop))
then
                                                 response.write "-"
                                     else
                                                 response.write
trim(myarray(myfieldloop,myloop))
                                     end if
                                     response.write "</td>"
                         next
                         response.write "</tr>" & vbcrlf
                         flipper = not flipper
                         myloop = myloop + 1
             loop        ' myloop = mycount
             response.write "</table>" & vbcrlf
end if             ' not myrs.eof
response.write "Finished results.<br/>"
response.flush
myconn.close
set myconn = nothing
set myrs = nothing

end sub


%></body>
</html>


--
Loyd Goodbar
Programmer/analyst
BorgWarner Incorporated
ETS/Water Valley
662-473-5713
lgoodbar@xxxxxxxxxxxxxx

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.







As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.