Normally I pass an SQL string to a command object to update databases but in the case when I need to get an autonumbered ID I open the recordset with ADO.
With RS
.AddNew
.Fields(sField) = sData
.Update
'now the record is created
'get the ID
.Fields("ID") = lID
End With...
I built my reports in Crystal Reports then imported them to VB into the RDC. I used to use an Access database and to set the database location for the RDC I used this code:
For I = 1 To Report.Database.Tables.Count
Report.Database.Tables.Item(I).Location = SourceFile 'SourceFile holds the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.