VB.net Create a query inside an Access database
Posted on 2013-05-26
Hi. I am using the following VB.net code to create a view inside a SQL database.
What similar code would I use to create a query inside an Access database?
Sub Create_SQL_View(ByVal oViewName As String, ByVal oSQL As String)
Dim myConnection As SqlConnection = New SqlConnection(Globals.ThisAddIn.oRIGHT.lblConnectionString.Text)
Dim myCommand As SqlCommand
Dim S As String = "CREATE VIEW " & oViewName & " AS " & " " & oSQL
myCommand = New SqlCommand(S, myConnection)