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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL query at runtime using CR

Status
Not open for further replies.

qwertyqwerty

Programmer
Aug 16, 2002
3
GB
I have this CR with what I believe is a built-in sql query in the VB designer. When I run it the report loads fine. However when I try to run a query at run time as per:

[vbcode]
adoRS.Open "SELECT Nber_Calling, Call_Destination, Nbr_Called, Date_Time_Called, Call_Duration, Call_Cost, Call_Type " & _
"FROM CRCustomerInv WHERE Cust_Nber = '" & custData(0) & "'", myDbCon, adOpenDynamic, adLockBatchOptimistic
InvM.Database.SetDataSource adoRS
[/vbcode]

The VB IDE crashes. How can I cancel this built in query so I can use queries at runtime?

I some CR smaples I got with the CR programme when I right-click over Database Fields in the panel on the LHS, I don't see 'Show SQL Query'. It's there in my project. I believe this is what is confusing the IDE as it is expecting to only run the query in there. I want to run a query at run-time and cancel this query. How do I do that? Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top