Hi all,
I have an access database that was created using a Database Generator app written in VB6. This app creates the database based on a dictionary text file.
I'm looking to upgrade this app to VB.net as I just can't stand VB6 anymore. I'm also trying to add a function that will recreate the dictionary file in case the original get's lost (which is my main reason for doing this, as I have a Database without a dictionary and don't want to recreate this by hand).
My problem is that I can't seem to find any info on how to retrieve the SQL string from a query that already exists in the database. I need this to retrieve any joins it may contain.
The VB6 app is using DAO with code similar to this:
Dim dbTemp As Database
Set dbTemp = DBEngine.OpenDatabase("PATH")
Dim qryTemp As QueryDef
Set qryTemp = m_dbData.QueryDefs("QUERY")
Dim sSQLString As String = qryTemp.SQL
If anyone knows how to achieve this in VB.net using ADO please let me know.
Many thanks
Andy