PC Review


Reply
Thread Tools Rate Thread

Create DB with ADOX to use MDW file

 
 
Webtree
Guest
Posts: n/a
 
      11th Jul 2003
HELP..................... I'm tearing my hair out

I need to create an MDB file in access2000 using ADOX to use a given
MDW file. I have tried

adoCat.create "provider=microsoft.jet.oledb.4.0;DAta
Source='c:\bob.mdb'"

which works

If I append ";jet oledb:System Database=pathtoMDWfile;usr=x;pwd=y"

I am getting "Could not find installable ISAM"

Any fix or alternative code to create an Access DB using an MDW file
via ADOX will be greatly appreciated.

Any Ideas?
 
Reply With Quote
 
 
 
 
Webtree
Guest
Posts: n/a
 
      11th Jul 2003
Update, valid credentials for the MDW fail, as do admin and blank...

AAAAAAAAAARGH

On Fri, 11 Jul 2003 15:30:37 +0100, Webtree
<(E-Mail Removed)> wrote:

>Hi, I have now managed to get past the error,not sure how, but I'm
>creating an user, and adding them using the code below.
>
>Please whats wrong with this code It crashes on Create the Database
>File, (adocat.create) with Not a valid Account Name or Password
>
>I tried to set admin priviledges on the DB to the user, but couldn't
>figure out how to use SetPermissions for the DB object.
>
>Public Function testado()
>
>
>Dim adoCat As ADOX.Catalog
>Dim adoCurCat As ADOX.Catalog
>Dim tbl1 As ADOX.Table
>
>Dim strName As String
>
>Dim usr1 As ADOX.User
>Dim grp1 As ADOX.Group
>
>Dim strUser As String
>Dim strPassword As String
>Dim strPID As String
>
>strUser = "TransferUserABC123"
>strPassword = "TUA1"
>strPID = "qwertyuiop"
>
>strName = "c:\fred_" & Format(Time, "hh_mm_ss") & ".mdb"
>
>Set adoCat = New ADOX.Catalog
>Set adoCurCat = New ADOX.Catalog
>
>adoCurCat.ActiveConnection = CurrentProject.Connection
>
>Set usr1 = New ADOX.User
>Set grp1 = adoCurCat.Groups("botAccess")
>
>usr1.Name = strUser
>
>'usr1.Properties("PID") = strPID
>'usr1.ChangePassword "", strPassword
>
>adoCurCat.Users.Append strUser ', strPassword
>
>'usr1.ChangePassword "", strPassword
>
>adoCurCat.Groups("botAccess").Users.Append usr1.Name
>'usr1.Groups.Append "botAccess"
>
>
>For Each tbl1 In adoCurCat.Tables
> adoCurCat.Users(strUser).SetPermissions tbl1.Name, adPermObjTable,
>adAccessSet, adRightFull
>Next
>
>'Create the database file
>adoCat.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Database='" & strName & "';" & _
> "Usr=" & strUser & ";Pwd=" & "" & ";" & _
> "Jet OLEDB:System
>database=d:\mydocu~1\hawthorne\botmdw.mdw;"
>
>adoCurCat.Users.Delete strUser
>
>
>End Function
>
>
>
>On Fri, 11 Jul 2003 15:06:13 +0100, Webtree
><(E-Mail Removed)> wrote:
>
>>HELP..................... I'm tearing my hair out
>>
>>I need to create an MDB file in access2000 using ADOX to use a given
>>MDW file. I have tried
>>
>>adoCat.create "provider=microsoft.jet.oledb.4.0;DAta
>>Source='c:\bob.mdb'"
>>
>>which works
>>
>>If I append ";jet oledb:System Database=pathtoMDWfile;usr=x;pwd=y"
>>
>>I am getting "Could not find installable ISAM"
>>
>>Any fix or alternative code to create an Access DB using an MDW file
>>via ADOX will be greatly appreciated.
>>
>>Any Ideas?


 
Reply With Quote
 
Dave
Guest
Posts: n/a
 
      11th Jul 2003
Post your question on the newsgroup: Microsoft.public.access

Also try looking for answer on Microsoft.com (Support - Knowledge base)


"Webtree" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Fri, 11 Jul 2003 15:32:38 +0100, Webtree
> <(E-Mail Removed)> wrote:
>
> >Update, valid credentials for the MDW fail, as do admin and blank...
> >
> >AAAAAAAAAARGH
> >
> >On Fri, 11 Jul 2003 15:30:37 +0100, Webtree
> ><(E-Mail Removed)> wrote:
> >
> >>Hi, I have now managed to get past the error,not sure how, but I'm
> >>creating an user, and adding them using the code below.
> >>
> >>Please whats wrong with this code It crashes on Create the Database
> >>File, (adocat.create) with Not a valid Account Name or Password
> >>
> >>I tried to set admin priviledges on the DB to the user, but couldn't
> >>figure out how to use SetPermissions for the DB object.
> >>
> >>Public Function testado()
> >>
> >>
> >>Dim adoCat As ADOX.Catalog
> >>Dim adoCurCat As ADOX.Catalog
> >>Dim tbl1 As ADOX.Table
> >>
> >>Dim strName As String
> >>
> >>Dim usr1 As ADOX.User
> >>Dim grp1 As ADOX.Group
> >>
> >>Dim strUser As String
> >>Dim strPassword As String
> >>Dim strPID As String
> >>
> >>strUser = "TransferUserABC123"
> >>strPassword = "TUA1"
> >>strPID = "qwertyuiop"
> >>
> >>strName = "c:\fred_" & Format(Time, "hh_mm_ss") & ".mdb"
> >>
> >>Set adoCat = New ADOX.Catalog
> >>Set adoCurCat = New ADOX.Catalog
> >>
> >>adoCurCat.ActiveConnection = CurrentProject.Connection
> >>
> >>Set usr1 = New ADOX.User
> >>Set grp1 = adoCurCat.Groups("botAccess")
> >>
> >>usr1.Name = strUser
> >>
> >>'usr1.Properties("PID") = strPID
> >>'usr1.ChangePassword "", strPassword
> >>
> >>adoCurCat.Users.Append strUser ', strPassword
> >>
> >>'usr1.ChangePassword "", strPassword
> >>
> >>adoCurCat.Groups("botAccess").Users.Append usr1.Name
> >>'usr1.Groups.Append "botAccess"
> >>
> >>
> >>For Each tbl1 In adoCurCat.Tables
> >> adoCurCat.Users(strUser).SetPermissions tbl1.Name, adPermObjTable,
> >>adAccessSet, adRightFull
> >>Next
> >>
> >>'Create the database file
> >>adoCat.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> >> "Database='" & strName & "';" & _
> >> "Usr=" & strUser & ";Pwd=" & "" & ";" & _
> >> "Jet OLEDB:System
> >>database=d:\mydocu~1\hawthorne\botmdw.mdw;"
> >>
> >>adoCurCat.Users.Delete strUser
> >>
> >>
> >>End Function
> >>
> >>
> >>
> >>On Fri, 11 Jul 2003 15:06:13 +0100, Webtree
> >><(E-Mail Removed)> wrote:
> >>
> >>>HELP..................... I'm tearing my hair out
> >>>
> >>>I need to create an MDB file in access2000 using ADOX to use a given
> >>>MDW file. I have tried
> >>>
> >>>adoCat.create "provider=microsoft.jet.oledb.4.0;DAta
> >>>Source='c:\bob.mdb'"
> >>>
> >>>which works
> >>>
> >>>If I append ";jet oledb:System Database=pathtoMDWfile;usr=x;pwd=y"
> >>>
> >>>I am getting "Could not find installable ISAM"
> >>>
> >>>Any fix or alternative code to create an Access DB using an MDW file
> >>>via ADOX will be greatly appreciated.
> >>>
> >>>Any Ideas?

>



 
Reply With Quote
 
Joan Wild
Guest
Posts: n/a
 
      11th Jul 2003
Why are you using ADOX, which I understand to be buggy and unreliable?

--
Joan Wild
Microsoft Access MVP

"Webtree" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Fri, 11 Jul 2003 15:32:38 +0100, Webtree
> <(E-Mail Removed)> wrote:
>
> >Update, valid credentials for the MDW fail, as do admin and blank...
> >
> >AAAAAAAAAARGH
> >
> >On Fri, 11 Jul 2003 15:30:37 +0100, Webtree
> ><(E-Mail Removed)> wrote:
> >
> >>Hi, I have now managed to get past the error,not sure how, but I'm
> >>creating an user, and adding them using the code below.
> >>
> >>Please whats wrong with this code It crashes on Create the Database
> >>File, (adocat.create) with Not a valid Account Name or Password
> >>
> >>I tried to set admin priviledges on the DB to the user, but couldn't
> >>figure out how to use SetPermissions for the DB object.
> >>
> >>Public Function testado()
> >>
> >>
> >>Dim adoCat As ADOX.Catalog
> >>Dim adoCurCat As ADOX.Catalog
> >>Dim tbl1 As ADOX.Table
> >>
> >>Dim strName As String
> >>
> >>Dim usr1 As ADOX.User
> >>Dim grp1 As ADOX.Group
> >>
> >>Dim strUser As String
> >>Dim strPassword As String
> >>Dim strPID As String
> >>
> >>strUser = "TransferUserABC123"
> >>strPassword = "TUA1"
> >>strPID = "qwertyuiop"
> >>
> >>strName = "c:\fred_" & Format(Time, "hh_mm_ss") & ".mdb"
> >>
> >>Set adoCat = New ADOX.Catalog
> >>Set adoCurCat = New ADOX.Catalog
> >>
> >>adoCurCat.ActiveConnection = CurrentProject.Connection
> >>
> >>Set usr1 = New ADOX.User
> >>Set grp1 = adoCurCat.Groups("botAccess")
> >>
> >>usr1.Name = strUser
> >>
> >>'usr1.Properties("PID") = strPID
> >>'usr1.ChangePassword "", strPassword
> >>
> >>adoCurCat.Users.Append strUser ', strPassword
> >>
> >>'usr1.ChangePassword "", strPassword
> >>
> >>adoCurCat.Groups("botAccess").Users.Append usr1.Name
> >>'usr1.Groups.Append "botAccess"
> >>
> >>
> >>For Each tbl1 In adoCurCat.Tables
> >> adoCurCat.Users(strUser).SetPermissions tbl1.Name, adPermObjTable,
> >>adAccessSet, adRightFull
> >>Next
> >>
> >>'Create the database file
> >>adoCat.Create "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> >> "Database='" & strName & "';" & _
> >> "Usr=" & strUser & ";Pwd=" & "" & ";" & _
> >> "Jet OLEDB:System
> >>database=d:\mydocu~1\hawthorne\botmdw.mdw;"
> >>
> >>adoCurCat.Users.Delete strUser
> >>
> >>
> >>End Function
> >>
> >>
> >>
> >>On Fri, 11 Jul 2003 15:06:13 +0100, Webtree
> >><(E-Mail Removed)> wrote:
> >>
> >>>HELP..................... I'm tearing my hair out
> >>>
> >>>I need to create an MDB file in access2000 using ADOX to use a given
> >>>MDW file. I have tried
> >>>
> >>>adoCat.create "provider=microsoft.jet.oledb.4.0;DAta
> >>>Source='c:\bob.mdb'"
> >>>
> >>>which works
> >>>
> >>>If I append ";jet oledb:System Database=pathtoMDWfile;usr=x;pwd=y"
> >>>
> >>>I am getting "Could not find installable ISAM"
> >>>
> >>>Any fix or alternative code to create an Access DB using an MDW file
> >>>via ADOX will be greatly appreciated.
> >>>
> >>>Any Ideas?

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADOX in VB.NET to create Excel file Paul Microsoft Dot NET 0 17th Feb 2008 03:29 AM
VB.NET create JET database without ADOX Dan Hinsley Microsoft ADO .NET 6 25th Apr 2006 01:07 PM
Create MDB From DataSet and ADOX? xenophon Microsoft ADO .NET 4 23rd Mar 2006 06:35 AM
Create DB without ADOX =?Utf-8?B?VGluaw==?= Microsoft Dot NET 3 20th Aug 2004 02:50 PM
create ADOX table Shaun Microsoft Access Database Table Design 1 14th Mar 2004 10:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:43 AM.