Dim conn As Connection
Dim cmd As Command
Dim Stmt As String
Set conn = New ADODB.Connection
Set cmd = New ADODB.Command
conn.Open "DSN=DOWNLOADS;Uid=***;PWD=***"
cmd.CommandTimeout = 110
cmd.ActiveConnection = conn
'Stmt = "insert into yao.trgfile (addin) values('n')"
Stmt = "CALL QSYS.QCMDEXC1 ('call yao/addlib', 0000000015.00000)"
cmd.Prepared = True
cmd.CommandText = Stmt
cmd.Execute
conn.Close
Set cmd = Nothing
Set conn = Nothing
Dim cmd As Command
Dim Stmt As String
Set conn = New ADODB.Connection
Set cmd = New ADODB.Command
conn.Open "DSN=DOWNLOADS;Uid=***;PWD=***"
cmd.CommandTimeout = 110
cmd.ActiveConnection = conn
'Stmt = "insert into yao.trgfile (addin) values('n')"
Stmt = "CALL QSYS.QCMDEXC1 ('call yao/addlib', 0000000015.00000)"
cmd.Prepared = True
cmd.CommandText = Stmt
cmd.Execute
conn.Close
Set cmd = Nothing
Set conn = Nothing