I give up. I've looked for 2 hours now,
how do you create a new database (not a table) in ADO?
also, how do I delete this thread because my stupid *($#&*#$& is so slow I hit the submit button twice?
Printable View
I give up. I've looked for 2 hours now,
how do you create a new database (not a table) in ADO?
also, how do I delete this thread because my stupid *($#&*#$& is so slow I hit the submit button twice?
What database type are you trying to create?? Access, SQL Server, Oracle, Sybase ?
Use ADOXfor details see my site...VB Code:
Dim catADO As ADOX.Catalog catADO.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=TestDatabase.mdb"
Only works when the string is explicit:
Code:
Dim catADO As ADOX.Catalog
Dim str_Temp As String
Set catADO = New ADOX.Catalog
catADO.Create "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\xsxx.mdb"
works fine, but
gets an error: Class not registeredCode:Dim catADO As ADOX.Catalog
Dim str_Temp As String
Set catADO = New ADOX.Catalog
str_Temp = "Provider=Microsft.Jet.OLEDB.4.0;Data Source=c:\xsxx.mdb"
catADO.Create (str_Temp)
Any ideas?
If it is just the name of the new db you want to change thenVB Code:
Dim catADO As ADOX.Catalog Dim str_Temp As String Set catADO = New ADOX.Catalog str_Temp = "c:\xsxx.mdb" catADO.Create "Provider=Microsft.Jet.OLEDB.4.0;Data Source=" & str_Temp
Or see your chit chat thread!
I answered it there!
later
b :)
I'm an idiot.
I'm dumber than snails.
I talk to squirrels.
I can't spell MICROSOFT.
That's the error in the above. The word Microsoft in the connection string is spelled MICROSFT.
damn machines.
Oh dear...
Perhaps we should have looked at the obvious first.
We did Gab. It's just that looking for your own errors in spelling is difficult under the best of circumstances. That's why a good editor is more precious than a good author.