How do you perform querydef in vb.net

T

Turlough

I want to create a query in an access database - In vb.6 I used the
following syntax

Dim qdfNew As QueryDef
Dim SQL As String
On Error Resume Next

SQL = "select * from QrySubRegData UNION ALL Select * from QrySubBeerData;"

With db
.QueryDefs.Delete "QryUnionResetBase"
Set qdfNew = .CreateQueryDef("QryUnionResetBase", SQL)
End With

How do i do this using oledb in vb.net
 

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

Top