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

SQL Stored procedure from Clarion 1

Status
Not open for further replies.

CalebTemple

Programmer
Jan 30, 2003
5
0
0
ZA
How do i call an SQL stored procedure(MS SQL 2k), with parameters, from Clarion?


 
Have you Read the Clarion Help - MSSQL Acc - Using Embedded Code?

I normally create a Dummy Table in MS-SQL and then create a view on that table and execute the SQL command on the view.
The way to execute is to use PROP:SQL.

SQLView VIEW(DummyFile)
....
END

Param1 string(30)
Param2 long
RetVal LONG

STORED PROCEDURE with Parameters Passed :

SQLView{PROP:SQL} = 'CALL dbo.store_proc_name (<39>' & CLIP(Param1) & '<39>, ' & Param2 & ')'

STORED PROCEDURE with Parameters Passed with Return Value:

BIND('RetVal',RetVal)
SQLView{PROP:SQL} = '&RetVal = CALL dbo.store_proc_name (<39>' & CLIP(Param1) & '<39>, ' & Param2 & ')'
UNBIND('RetVal')

STORED PROCEDURE with Parameters Passed with Return Value & OUTPUT Parameter (Param1):

BIND('RetVal',RetVal)
BIND('Param1',Param1)
SQLView{PROP:SQL} = '&RetVal = CALL dbo.store_proc_name ( &Param1, ' & Param2 & ')'
UNBIND('RetVal')
UNBIND('Param1')

 
If you are using the PROP:SQL to return back OUTPUT Parameters, the DummyFile should be opened in READ-ONLY, DENY ALL mode. You can set this in the File Overrides of the Global settings of the APP.
 
i need help about progress bar.
i make a back end script with sql server200 and i want to make progress bar in clarion can anyone help me.


thanks
Lie Andry Ridwan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top