how to connect to ibm- universal database db2

Results 1 to 2 of 2

Thread: how to connect to ibm- universal database db2

  1. #1
    Join Date
    Dec 1969

    Default how to connect to ibm- universal database db2

    Dear Sir,<BR>Our company IIS Infotech Ltd. is engaged in developing Web-based<BR>applications<BR>and other software related services.This concerns a particular project we<BR>are<BR>working on right now.<BR><BR>We have IBM UDB DB2 running under Windows NT 4.0. We are trying to use<BR>active<BR>server pages (ASPs) to access the data.<BR><BR>Can you tell us in detail on the following :---<BR><BR>Is it possible to establish connection of Asp and udb ? how?<BR><BR>To do this, we are refering to SAMS Teach Yourself DB2 Universal Database<BR>Book<BR>in 21 days but we couldn&#039t solve the problem.<BR><BR>Please advise in the matter ASAP. We will highly appreciate if you inform<BR>us<BR>you telephone number so that we speak personally.

  2. #2
    Join Date
    Dec 1969

    Default RE: how to connect to ibm- universal database db2

    I am currently using ASP Pages with an AS400 DB2 database using ADO and a Client access odbc driver to connect.<BR>the following code is an Example of how to connect to DB2, Fill a REcordset and display info into an Option box (similar to an ActiveX Combo Box)<BR><BR>&#060;%<BR>Dim Connection<BR>Set connection = server.createobject("adodb.connection")<BR>connect "dsn=ODBC Driver Name; uid=" & Username & "; pwd=" & Password<BR><BR>%&#062;<BR>&#060;%<BR>Dim RS<BR><BR>Set RS = Connection.Execute(" SQL Statement Goes Here ")<BR><BR>%&#062;<BR>&#039Name of option Box<BR>&#060;select name=cmbQanmbr&#062;<BR>&#060;% <BR>i = 1<BR>do while not RS.eof and i &#060; 10<BR>%&#062;<BR>Retrieve first 10 Records<BR>and put them into the option box<BR> &#060;%<BR>Response.write"&#060;option Name=&#062;"<BR>Response.write RS("field Names Within the Table In SQl statement") &"," <BR>Response.write RS(" Second Field Name within Table if you wish to do so ") & "&#060;/option&#062;"<BR>%&#062;<BR><BR><BR><BR>&#060;%<BR >rs.movenext<BR>i = i + 1<BR>loop<BR>%&#062;<BR><BR>&#060;%<BR>Clear memory space allocated to Recordset<BR>RS.close<BR>Set RS = nothing<BR><BR>%&#062;<BR><BR>&#060;/select&#062; <BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts