HOW TO USE RDO in an ASP page!

Results 1 to 2 of 2

Thread: HOW TO USE RDO in an ASP page!

  1. #1
    Join Date
    Dec 1969

    Default HOW TO USE RDO in an ASP page!

    A Colleague of mine figured this one out, and I had to post this as we could not find anything in MSDN or on the Web to help us with this.<BR>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^<BR>This is used to connect to a DB2 database using the StarQuest Driver.<BR>*************************************** ************<BR>&#060;%<BR>Set m_oDB = CreateObject("MicrosoftRDO.RdoConnection2.0")<BR>S et oRecordSet = CreateObject("MicrosoftRDO.RdoQuery2.0")<BR>Set rdoE = CreateObject("MicrosoftRDO.RdoEngine2.0")<BR> <BR>sConnect = "DSN=yourDNSname;UID=yourUIDhere;PWD=yourPWhere;"< BR>Set m_oDB = rdoE.rdoEnvironments(0).OpenConnection("", 1, False, sConnect)<BR>&#039;Your can call a select statement here or just a stored procedure like the example here <BR>strSQL = "CALL SYSPROC.RETURNPRICE(VARIABLE_1,VARIABLE_2,VARIABLE _3,VARIABLE_4)"<BR><BR>Set oRecordSet = m_oDB.OpenResultset(strSQL, 3)<BR><BR>If (False = (oRecordSet.BOF And oRecordSet.EOF)) Then<BR> While (Not oRecordSet.EOF)<BR> &#039;Process the result set here.<BR> Response.Write oRecordSet(2)<BR> oRecordSet.MoveNext<BR> Wend<BR>Else<BR> Response.Write "Sorry"<BR>End If<BR>%&#062;<BR>********************************* ******************

  2. #2
    Join Date
    Dec 1969

    Default For future reference

    If you use regedit.exe and search for something like "RDO", you will eventually find the class id aliases needed for CreateObject.

Posting Permissions

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