Action Queries inside MDB files

  • Thread starter Thread starter A.M
  • Start date Start date
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
 
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
 
* "A.M said:
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 ?

Notice that a separate group for ADO.NET related question is available:

<
Web interface:

<http://msdn.microsoft.com/newsgroup...roup=microsoft.public.dotnet.framework.adonet>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
 
Hi Ali,

Here is sample about how to use ADOX and ADO to excute the query.
ACC2000: How to Use Parameters with ActiveX Data Objects (ADO) and Jet
http://support.microsoft.com/?id=225897

Here is sample about how to use ADOX in VB.NET
HOW TO: Create a Microsoft Access Database Using ADOX and Visual Basic .NET
http://support.microsoft.com/?id=317867

You may have a try and let me know the result.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
¤ 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)
 
Hi Ali,

Did my suggestion works for you?
If you have any question on this problem, please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top