sql from Ado to Progress by Openlink

edi

New Member
Hello, guys!

I have a big trouble and maybe you can give me any idea.
I want to create an front-end application using VB6 and ADO 2.5 to
display some data from Progress 8.3 DB
So, my the configuration is:

Progress 8.3 DB on Win

ODBC :OpenLink Generic 32 bit Driver
Visual Basic 6 front end form to connect to Progress DB via System DSN
Client OS: Windows xp

In VB, I put in a module:




Private Sub Command1_Click()

Dim cndata As ADODB.Connection

Dim rsCurr As ADODB.Recordset

Dim Date1 As Date
Date1 = "12/03/2005"


Set cndata = New ADODB.Connection

Set rsCurr = New ADODB.Recordset

cndata.Open "DSN=prod90"

rsCurr.Open "SELECT PROD90.exr_rate.exr_curr1, PROD90.exr_rate.exr_curr2, PROD90.exr_rate.exr_end_date, PROD90.exr_rate.exr_rate, PROD90.exr_rate.exr_rate2

From PROD90.exr_rate

Where ((PROD90.exr_rate.exr_end_date) < " & Date1 & ")
ORDER BY PROD90.exr_rate.exr_end_date DESC", cndata, adOpenDynamic, adLockReadOnly



MsgBox rsCurr.Fields(1(

rsCurr.Close

cndata.Close

Set cndata = Nothing

End Sub



Date is a problem.

I have tried to build it with “#” like in Access or by parameters but i have the sane error:
[OpenLink][ODBC][Progress Server]**Incompatible data types in expression or assignment.(223)

Do you have any ideas or code example about my problem?
I searched into the list's archive, but nothing.

Thank you in advance.
Edi

 
Top