|
-
December 16th, 1999, 10:29 AM
#1
Which is the right reference for a Database object?
I want to set an object as Database:
Dim db as Database
Which is the Refernce that I must set in order to satisfy this?
Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece
-
December 16th, 1999, 10:34 AM
#2
Re: Which is the right reference for a Database object?
Hi,
Please check on Microsoft DAO 3.51 Object Library.
Santulan
-
December 16th, 1999, 10:42 AM
#3
Re: Which is the right reference for a Database object?
I already use ADO 2.0. Doesn't it support it? Am I enforced to use DAO?
Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece
-
December 16th, 1999, 10:51 AM
#4
Re: Which is the right reference for a Database object?
Well, I have not used ADO so far but to use database I always use DAO.
I just think that with ADO you use ADODB or Connection.
Santulan
-
December 16th, 1999, 09:20 PM
#5
Re: Which is the right reference for a Database object?
I have been useing this approach, but if you have a better one let me know..
Database SQL 6.5
'//
PROVIDERTIMEOUT=100 ' Really slow app.
ADOProvider = "SQLOLEDB"
DB_ENV = ";Server=" & DSNAME & ";Uid=" & DSN_UID & ";Pwd=" & DSN_PWD & ";Database=" & DSN_DB
OBWebDB.CommandTimeout = PROVIDERTIMEOUT
OBWebDB.Provider = ADOProvider
OBWebDB.Open DB_ENV
whg
-
December 17th, 1999, 02:34 AM
#6
Re: Which is the right reference for a Database object?
Better solution: Data Environment -> Visual and easy!
Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece
-
December 17th, 1999, 09:05 AM
#7
Re: Which is the right reference for a Database object?
To use a Database object you must first make a reference to DAO. Go to Project, References, Microsoft DAO x.x Object Library. After making this reference, you can then Dim a variable as a database object.
-
December 17th, 1999, 02:41 PM
#8
Re: Which is the right reference for a Database object?
Use the following code to set a reference to a database object:
Sub CreateDatabaseX()
Dim wrkDefault As Workspace
Dim dbsNew As DATABASE
Dim prpLoop As Property
' Get default Workspace.
Set wrkDefault = DBEngine.Workspaces(0)
' Make sure there isn't already a file with the name of
' the new database.
If Dir("NewDB.mdb") <> "" Then Kill "NewDB.mdb"
' Create a new encrypted database with the specified
' collating order.
Set dbsNew = wrkDefault.CreateDatabase("NewDB.mdb", _
dbLangGeneral, dbEncrypt)
End Sub
-
December 18th, 1999, 07:29 AM
#9
Ok thanx!
Finally you have right, but I don't want to use DAO. I thought database object was supported by ADO that I use. I have no experience with DAO...
Thanx man for your help, and all the others of course!
Michael Vlastos
Automation Engineer
Company SouthGate Hellas SA
Development Department
Athens, Greece
-
December 19th, 1999, 07:54 PM
#10
Re: Which is the right reference for a Database object?
If you want to programmatically change the Data Environment database, use something like this:
deObject.YourConnection.Open "PROVIDER=xyz;Data Source=filename.abc"
Francis Gingras
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
|