Topic: How to Pass recordset from vb6 application Posted: 04 Jun 2012 at 7:32pm
How to Pass Recordset From Vb6 Application to Crystal Report 10 ?
I have written the following code for passing recordset . still no luck. I am getting an error of "table not found?"
Following is the code
Dim m_Report as new CrystalReportSmple
Private sub Form1() Dim strconn As String Dim rsCompany As ADODB.Recordset Screen.MousePointer = vbHourglass
Set m_Connection = New ADODB.Connection Set rsCompany = New ADODB.Recordset ''''''''''''''Connection Sting''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' strconn = "DRIVER={MySQL ODBC 3.51 Driver};user=test;password=test;server=localhost;Database=TestDatabase;option=16427" m_Connection.Open strconn
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Query = "SELECT FirstName,LastName,Address,City FROM tblcustomers " rsCompany.Open Query, m_Connection, adOpenStatic, adLockOptimistic
''''''''''''''''''''''''''''''''''''''''''''''Getting Error at this line'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
m_Report.Database.SetDataSource rsCompany
''''''''''''''''''''''''''''''''''''''''''''''Mapping to unbound fields'''''''''''''''''''''''''''''''''''''''''''''''''''''''' With m_Report .UnboundString1.SetUnboundFieldSource "{tblcustomers.FirstName}" .UnboundString2.SetUnboundFieldSource "{tblcustomers.LastName}" End With
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum