I have a VBscript that's opening up an Access DB, and I need to create a query from one of the tables, then export the table. I need to create the query because I need to format the number columns since in the DB they have like 10 decimal places but when exported only have 2. I need all 10. I don't control this Access DB, instead I download it so asking the source to make this query isn't an option.
The error with the below is: "ADODB.Command: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another." what am I missing?
Dim oAccess
Set oAccess = CreateObject("Access.Application")
oAccess.OpenCurrentDatabase("dbfile here")
Dim oQry
Set oQry = CreateObject("ADODB.Command")
oQry.ActiveConnection = oAccess.CurrentProject.Connection
oQry.CommandType = 1
oQry.CommandText = "create view qryTable as select * from table"
oQry.Execute
Set oQry = Nothing
Set oAccess = Nothing