-
Ado using Data Link File Question
Hello there:
Could you assist me with a data link file question? You can? Great!
Here’s the thing. I am using a .UDL file and on the ALL tab I want it to
access a workgroup file. Here’s the text from dragging the icon to a text
pad editor:
ÿþ[ o l e d b ]
; E v e r y t h i n g a f t e r t h i s l i n e i s a n O
L E D B i n i t s t r i n g
P r o v i d e r = M i c r o s o f t . J e t . O L E D B . 4 . 0 ; D a t
a S o u r c e = C : \ A W a r e \ V B F o l d e r \ A c t i v e X 4 A
W A R E \ C o n n e c t i o n L e s s \ A d o C o n n \ V B 6 F i l e s \
P r o V B 6 D B . m d b ; M o d e = R e a d | W r i t e ; P e r s i s t
S e c u r i t y I n f o = F a l s e ; J e t O L E D B : S y s t e m
d a t a b a s e = C : \ A W a r e \ V B F o l d e r \ A c t i v e X 4
A W A R E \ C o n n e c t i o n L e s s \ A d o C o n n \ V B 6 F i l e s
\ M m d . m d w ; J e t O L E D B : C r e a t e S y s t e m D a t a
b a s e = T r u e ; J e t O L E D B : E n c r y p t D a t a b a s e =
T r u e
Ok! Now here’s my command in VB6 enterprise with an ADO component:
sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Persist Security Info=True;" _
& "Data Source= " & sDBLocation & ";" _
& "Mode=Read|Write;" _
& "Jet OLEDB atabase; Uid=janxoly; Password=oxxixe"
I get an error about the workgroup file could not be found or is in use.
The Article ID: Q189680 How to use data link files with ADO explains to
do one of the following:
Using a Data Link File in Code with an ADO Connection
Using a Data Link file for an ADO connection is fairly simple. Here is the
syntax, using an absolute path:
cnPubs.ConnectionString = "File Name=C:\Path\To\Pubs.UDL;"
You can also use a relative path as shown in the following example:
cnPubs.ConnectionString = "File Name=Pubs.UDL;"
-or-
cnPubs.ConnectionString = "File Name=Data\Pubs.UDL;"
I am lost whats the File Name = and is this DB.Recordset = path. Could you
point me in the right direction.
Thank you
Ken Howell
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks