Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
SP_REPORTS |
Author |
Message |
|
Posted : 2007-02-07 08:38:02 |
Hi ,
I am having problems calling stored procedures, to test I called the most simple one with no parameters. SP_REPORTS.
No errors are returned, but the dataset is empty, it works in the VB Demo. I am hoping to check my syntax when it is processed by QODBC or somewhere in the processing chain.
Ultimetely I am trying to get SP_LASTINSERTID to work and will give the SP_REPORTS a go soon too.
Where can I check or debug this?
thanks
Johan |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-02-07 09:06:43 |
For stored procedures, just use sp_report like any other "SELECT" statement, for example, save the following example as sp_report.vbs to a file.
'***************************************** Const adOpenStatic = 3 Const adLockOptimistic = 3 Dim oConnection Dim oRecordset Dim sMsg Dim sConnectString Dim sSQL sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;" sSQL = "sp_report CustomerBalanceSummary show Text, Label, Amount_1 parameters DateMacro = 'ThisMonthToDate', SummarizeColumnsBy = 'TotalOnly'"
Set oConnection = CreateObject("ADODB.Connection") Set oRecordset = CreateObject("ADODB.Recordset") oConnection.Open sConnectString oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic sMsg = "**********************" & Chr(10) Do While (not oRecordset.EOF) sMsg = sMsg & oRecordSet.Fields("Text") sMsg = sMsg & " " & oRecordSet.Fields("Label") sMsg = sMsg & " $" & oRecordSet.Fields("Amount_1") & Chr(10) oRecordset.MoveNext Loop sMsg = sMsg & "**********************" & Chr(10) MsgBox sMsg oRecordset.Close Set oRecordset = Nothing oConnection.Close Set oConnection = Nothing '*****************************************
Double click on it using Windows Explorer and you will get your Customer Balances:
|
|
|
|
|
Posted : 2007-02-07 09:47:41 |
Hi, Thanks,
but I am using doing the call from within Clarion and want to see what the actual string ends up once QODBC process it. Is there an accurate logfile somewhere?
thanks
Johan |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-02-07 10:07:15 |
Use VB Demo and:
sp_columns tablename
sp_reportcolumns reportname
for the schema details of tables and reports. To view what you are doing see: How do I turn on the trace log? |
|
|
|
|