Action Queries inside MDB files

A

A.M

Hi,

Using ADO.NET,
How can i execute action queries already saved inside an MDB file ?
I already know that i can run sql commands like UPDATE and INSERT, but how
can i run those ones already has been saved in the MDB file as a action
queries ?

Thanks,
Ali
 
C

Cor

Hi AM,

Do you mean something like this?

Dim cmd As New OleDBCommand("EXECUTE HKW.dbo.SelectMessages", conn)

(I have it as SQLcommand, so I don't know exactly if it works on MDB the
same)

Cor
 
J

Jacob Yang [MSFT]

Hi Ali,

I noticed that you posted the same question in the
microsoft.public.dotnet.languages.vb group. One of our team members has
replied to you on that thread. Please check it when you have time.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
P

Paul Clement

¤ Hi,
¤
¤ Using ADO.NET,
¤ How can i execute action queries already saved inside an MDB file ?
¤ I already know that i can run sql commands like UPDATE and INSERT, but how
¤ can i run those ones already has been saved in the MDB file as a action
¤ queries ?
¤

Here is an example:

Dim AccessConn As System.Data.OleDb.OleDbConnection
Dim AccessCommand As System.Data.OleDb.OleDbCommand
Dim ConnectionString As String

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\db1.mdb;"

AccessConn = New System.Data.OleDb.OleDbConnection(ConnectionString)

AccessConn.Open()

AccessCommand = New System.Data.OleDb.OleDbCommand("AccessQueryDefName", AccessConn)
AccessCommand.CommandType = CommandType.StoredProcedure
AccessCommand.ExecuteNonQuery

AccessConn.Close()


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top