Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table or view does not exist error when executing from vb scripts

Status
Not open for further replies.

williey

Technical User
Jan 21, 2004
242
Hi,
I get "table or view does not exist" error when executing Crystal reports using vb script. However the error will go away only after I have run the reports in Crystal.

There is 9 reports to run. If I run the first one the list thru Crystal, it will fail on the next report.

Connection is through ODBC. Any thoughts on the cause?
 
Here is the partial code used to execute the reports

' Set the object for the App
Set oRptApp = CreateObject("CrystalRuntime.Application")


' Set the object for the Saving Report
Set oRptSav = oRptApp.OpenReport(INPUT_PATH & IN_FILE2, 1)

' Set the authentication
oRptSav.Database.Tables.Item(1).SetLogOnInfo DB_SERVER, DB_INSTANCE, DB_USERID, DB_PASS

' Set the first parameter
Set oRptSavParam1 = oRptSav.ParameterFields.Item(1)

' Clear the first parameter value
oRptSavParam1.ClearCurrentValueAndRange

' Set the value of the first param
oRptSavParam1.AddCurrentValue CDate(endDate)

oRptSav.ReadRecords
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top