dbTalk Databases Forums  

calling a procedure with a parameter from VB

comp.databases.btrieve comp.databases.btrieve


Discuss calling a procedure with a parameter from VB in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bre-x
 
Posts: n/a

Default calling a procedure with a parameter from VB - 06-24-2003 , 02:12 PM






Could you guys help me to improve this function?
Thnk you all

The Procedure

CREATE PROCEDURE JCUserYes (in :tusert CHAR(30))
AS BEGIN
UPDATE UMC_JC SET TValue = 'Yes' WHERE TUser = :tusert;
END;

The Function on MS Access, V2000

Function UMC_User()
Dim cnn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim cmd As New ADODB.Command
Dim NU
NU = NetworkUserName
cnn.Open "Provider=PervasiveOLEDB;Data Source=UMC"
With cmd
.ActiveConnection = cnn
.CommandText = "JCUserYes"
.CommandType = adCmdStoredProc
Set Param1 = cmd.CreateParameter("tusert Char(30)", NU )
cmd.Parameters.Append Param1
.Execute
End With
End Function

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.