Mas Yudi, yg menunjukkan kita manggil stored procedure disini ya
cmd.CommandType = adCmdStoredProc
lalu nama stored procedurenya yg mana ? dbo.posting itu nama table di
SQL Server kan ? sorry nih masih awam SQL
Thanks
Yudi Hantoro wrote:
Dim cnn As ADODB.Connection
Dim cmd As ADODB.Command
Dim Waktu As Date
On Error GoTo myerr
Waktu = Now()
DoCmd.OpenForm "Tunggu"
DoCmd.RepaintObject acForm, "Tunggu"
Set cnn = New ADODB.Connection
cnn.Open "Provider=SQLOLEDB.1;Data Source=ACESSJOGJA;Initial
Catalog=financial", Forms!UserLogin!Text0.Column(1),
Forms!UserLogin!Text0.Column(3)
Set cmd = New ADODB.Command
Set cmd.ActiveConnection = cnn
cmd.CommandTimeout = 600
cmd.CommandText = "dbo.posting"
cmd.CommandType = adCmdStoredProc
cmd.Execute
Set cmd = Nothing
If cnn.State <> adStateClosed Then cnn.Close
Set cnn = Nothing
DoCmd.Close acForm, "Tunggu"
Waktu = Now() - Waktu
Exit Sub
myerr:
MsgBox Err.Description
*/Ivan Leonardo <[EMAIL PROTECTED]>/* wrote:
ada beberapa pertanyaan nih,
1. Stored procedures itu dibuat dan disimpan di sql server ? lalu
kalau
mau dipakai hrs kita panggil melalui VBA ?
2. Running query di server dan kirim hasilnya saja ?
3. bagaimana cara panggil/penggunaan stored procedure ?
Thanks
_,_._,___
---------------------------------------------------------------------------
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents of this
message, which arise as a result of e-mail transmission. If verification is
required please request a hard-copy version.