|
-
Aug 1st, 2000, 06:18 PM
#1
Thread Starter
Addicted Member
Hi,
I'm a newbie with databases, and I want to know how can I create a new database using ADO...Note that I'm not very familiar with the SQL language...
Thanks!
-
Aug 1st, 2000, 06:57 PM
#2
Frenzied Member
What DBMS are you using? SQL Server allows you to send DDL via a TSQL statement that could create a database, as long as the server is defined...
-
Aug 1st, 2000, 07:04 PM
#3
Thread Starter
Addicted Member
What???
I don't want to be silly, but I didn't really understood what are you talking about...after all, I'm still a newbie :-)
Well, if this helps, I'm using VB6, and ADO 2.5. And I'm working with an Access 2000 database, so no SQL Server. Although I'm aware I must use SQL syntax to use ADO, right?
Thanks for any help!
-
Aug 1st, 2000, 07:37 PM
#4
Frenzied Member
T-SQL is TransactSQL, basically an extended version of ANSI-SQL. DDL is Data Description Language, it's what you use to describe/build a database (DML, the other piece of DBMS's, is data manipulation language. Or in simpler terms, queries). You can use DDL in DAO to create an Access database but I'm not sure how you'd do it in ADO.
-
Aug 1st, 2000, 10:51 PM
#5
Guru
Create a database using ADO:
Code:
'uses ADO 2.x for DDL and security
Dim strConnectionStringOfNewDB As String
Dim objCat As ADOX.Catalog
'instantiate catalog object
Set objCat = New ADOX.Catalog
'connection string of new db -- includes driver/db type and location
strConnectionStringOfNewDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NewDB.mdb"
'create it
objCat.Create strConnectionStringOfNewDB
'cleanup
Set objCat = Nothing
-
Aug 2nd, 2000, 10:12 AM
#6
Thread Starter
Addicted Member
Hey, thanks a lot!
It works like a charm.
Now, I have a few more questions, but I don't think anyone is going to give me a tutorial about this, so... any good sources to learn ADO? preferably online, because there aren't any good books in my country, and buying them from somewhere else will take long...
thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|