如何在Stroed过程中调用MSFlex Grid和在存储过程中实现PLZ帮助我 [英] How to Call MSFlex Grid in Stroed Procedure and Implementation in Stored procedure plz help me out
本文介绍了如何在Stroed过程中调用MSFlex Grid和在存储过程中实现PLZ帮助我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个VB 6代码,我只想将此代码转换为存储过程.
请帮帮我,我需要将此MSFlx作为参数发送给我,帮帮我
i have a VB 6 Code i just want to convert this code to Stored procedure
please help me out i need to send this MSFlx as a Parameter plz help me out
Set RsSa = DB.OpenRecordset("select * from SALES where invno =" & Val(INVNOTXT.Text) & "", dbOpenDynaset)
L = 1
Do While L <= 10
If Trim(MSFLX1.TextMatrix(L, 1)) <> "" Then
RsSa.AddNew
RsSa!InvNo = Val(INVNOTXT.Text)
RsSa!InvDt = CDate(INVDATETXT.Text)
RsSa!Sno = L
RsSa!InvType = Stype
RsSa!Units = UCase(Trim(MSFLX1.TextMatrix(L, 2)))
RsSa!Qty = Val(MSFLX1.TextMatrix(L, 3))
RsSa!Rate = MSFLX1.TextMatrix(L, 4)
If Trim(MSFLX1.TextMatrix(L, 5)) <> "" Then RsSt!Remarks = Trim(MSFLX1.TextMatrix(L, 5))
RsSa.Update
End If
L = L + 1
Loop
推荐答案
此代码正在更新MSFlexGrid控件中的数据的数据表.如果要将其更改为存储过程,则只能通过调用该存储过程来一次更新一行.
This code is updating rows in a table with data from an MSFlexGrid control. If you want to change this to a stored procedure, you can update only one row at a time by calling the stored procedure.
CREATE PROCEDURE UpdateInvoice (
InvNo varchar,
InvValue float,
............
)
AS
BEGIN
UPDATE Invoice SET InvValue = @InvValue, .......
WHERE InvNo = @InvNo
END
然后从您的代码中调用此存储过程并传递参数.
and then call this stored procedure from your code and pass on the parameters.
此处有一篇不错的CP文章,可阅读 ^ ]
Here''s a good CP Article to read Overview of a Stored Procedures[^]
这篇关于如何在Stroed过程中调用MSFlex Grid和在存储过程中实现PLZ帮助我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文