In SQL Server 7.0
I have a database of SQL Server 7.0 named PUSTAKA and its table named ANGGOTA
Structure of ANGGOTA
P.Key Column Name Datatype Length Prec
* No_Anggota Char 5 0 0 Nama Varchar 50 0 0 Alamat Varchar 50 0 0 Kantong Smallint 2 5 0 Terisi Smallint 2 5 0
I made a stored procedure in PUSTAKA named SP_ANGGOTA
Content of SP_ANGGOTA :
Create Procedure SP_ANGGOTA
@Action Char(1),
@No_Anggota Char(5),
@Nama VarChar(50),
@Alamat VarChar(50),
@Kantong SmallInt,
@StrError VarChar(255) Output
AS …
Parameter descriptions :
@Action : "I" for Insert Table
: "U" for Update Table
: "D: for Delete Table
@StrErr will return a value like: "Key already exist"
In Visual FoxPro 5.0
I have a database of VFP 5.0 named DATAKU.DBC and it has a connection called MySQL_Conn
I create a remote view named ViewAnggota, then I execute this following commands in command window:
Use ViewAnggota
Browse
Then I update a field, success
My Questions are:
1.I try to insert a record in ViewAnggota but I fail,why.. ?
2.I execute SP_ANGGOTA as follow :
gcNo_Anggota = "A0001"
gcNama = "Abdul"
gcAlamat = "Jakarta"
gnKantong = 1
gcReturn = ""
STORE SQLCONNECT("MySQL_Conn"
TO gnConnHandle
= SQLSETPROP(gnConnHandle, 'Transactions', 2) && Manual transactions
= SQLEXEC(gnConnHandle, "EXEC SP_ANGGOTA 'I', gcNo_Anggota, ;
gcNama, gcAlamat, gnKantong, gcReturn Output"
= SQLCOMMIT(gnConnHandle) && Commit the changes
= SQLDISCONNECT(gnConnHandle)
Why that commands is not success?
How to make the right commands?
3.How to read an output parameter from SP_ANGGOTA (a stored procedure in SQL Server 7.0) ?
4.How to refresh ViewAnggota in a grid control which RecordSourceType = 1–Alias ?
5.How to create an online view ?
[sig][/sig]
I have a database of SQL Server 7.0 named PUSTAKA and its table named ANGGOTA
Structure of ANGGOTA
P.Key Column Name Datatype Length Prec
* No_Anggota Char 5 0 0 Nama Varchar 50 0 0 Alamat Varchar 50 0 0 Kantong Smallint 2 5 0 Terisi Smallint 2 5 0
I made a stored procedure in PUSTAKA named SP_ANGGOTA
Content of SP_ANGGOTA :
Create Procedure SP_ANGGOTA
@Action Char(1),
@No_Anggota Char(5),
@Nama VarChar(50),
@Alamat VarChar(50),
@Kantong SmallInt,
@StrError VarChar(255) Output
AS …
Parameter descriptions :
@Action : "I" for Insert Table
: "U" for Update Table
: "D: for Delete Table
@StrErr will return a value like: "Key already exist"
In Visual FoxPro 5.0
I have a database of VFP 5.0 named DATAKU.DBC and it has a connection called MySQL_Conn
I create a remote view named ViewAnggota, then I execute this following commands in command window:
Use ViewAnggota
Browse
Then I update a field, success
My Questions are:
1.I try to insert a record in ViewAnggota but I fail,why.. ?
2.I execute SP_ANGGOTA as follow :
gcNo_Anggota = "A0001"
gcNama = "Abdul"
gcAlamat = "Jakarta"
gnKantong = 1
gcReturn = ""
STORE SQLCONNECT("MySQL_Conn"
= SQLSETPROP(gnConnHandle, 'Transactions', 2) && Manual transactions
= SQLEXEC(gnConnHandle, "EXEC SP_ANGGOTA 'I', gcNo_Anggota, ;
gcNama, gcAlamat, gnKantong, gcReturn Output"
= SQLCOMMIT(gnConnHandle) && Commit the changes
= SQLDISCONNECT(gnConnHandle)
Why that commands is not success?
How to make the right commands?
3.How to read an output parameter from SP_ANGGOTA (a stored procedure in SQL Server 7.0) ?
4.How to refresh ViewAnggota in a grid control which RecordSourceType = 1–Alias ?
5.How to create an online view ?
[sig][/sig]