VB6, ADO, and writing to an Access 2000 db with user level security 
Author Message
 VB6, ADO, and writing to an Access 2000 db with user level security

I posted before without full and accurate information, so here we go
again.

This Access 2K db is using user level security (secured.mdw).

I already found this article during my searches, but it doesn't
address my issue of not being able to write to the db
( http://www.*-*-*.com/ ;EN-US;q191754)

I can log into the db using ADO and query info, but can't write to it
even if using a person with admin rights.

I have MDAC 2.7 and Jet 4.0 SP6 installed.

The error I receive on the rst.save line is:  
Run-time Error
-2147286781 (80030103)
Can't Save

I searched the web, MS, and Google and can't find any ideas for this
code to not work.

Here's the code I have that lets me at least query the db and runs
with no errors UNTIL it hits the rst.Save line:
    Dim MyConn As New ADODB.Connection, rst As ADODB.Recordset
    Dim strConn As String
    Set rst = New ADODB.Recordset
    strConn = "Data Source=" & txtMDB.Text & ";" & _
              "Jet OLEDB:System database=" & txtMDW.Text
    MyConn.Provider = "Microsoft.Jet.OLEDB.4.0"
    MyConn.Open ConnectionString:=strConn, _
                UserID:=txtLogin.Text, Password:=txtPass.Text
    rst.Open "select * from ContactInfo", MyConn, adOpenKeyset,
adLockOptimistic
    Do While Not rst.EOF
        a = rst![Business Address 1]
        If InStr(a, Chr$(13) & Chr$(10)) Then
            rst![Business Address 1] = Replace(a, Chr$(13) & Chr$(10),
txtReplaceChar)
        End If
        rst.Save
        rst.MoveNext
    Loop
    rst.Close
    MyConn.Close

If I take out the rst.Save line the code works.

I just thought that once I supplied the correct login info to the db
that I could write if that login had the rights to do so.

Let me know if u have any ideas or have code that works for this
issue...

Thanks!

Rob
Please refrain from emailing me so the other
group members can gain from the info as well...

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
    http://www.*-*-*.com/       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----



Sat, 01 Jan 2005 23:00:10 GMT  
 VB6, ADO, and writing to an Access 2000 db with user level security
The Save method shouldn't be there. That's for saving (exporting) the
recordset to a file - all you want to do is talk to the table in the
database. Use the Update method instead.

 - Chris Paterson


Quote:
> I posted before without full and accurate information, so here we go
> again.

> This Access 2K db is using user level security (secured.mdw).

> I already found this article during my searches, but it doesn't
> address my issue of not being able to write to the db
> (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q191754)

> I can log into the db using ADO and query info, but can't write to it
> even if using a person with admin rights.

> I have MDAC 2.7 and Jet 4.0 SP6 installed.

> The error I receive on the rst.save line is:
> Run-time Error
> -2147286781 (80030103)
> Can't Save

> I searched the web, MS, and Google and can't find any ideas for this
> code to not work.

> Here's the code I have that lets me at least query the db and runs
> with no errors UNTIL it hits the rst.Save line:
>     Dim MyConn As New ADODB.Connection, rst As ADODB.Recordset
>     Dim strConn As String
>     Set rst = New ADODB.Recordset
>     strConn = "Data Source=" & txtMDB.Text & ";" & _
>               "Jet OLEDB:System database=" & txtMDW.Text
>     MyConn.Provider = "Microsoft.Jet.OLEDB.4.0"
>     MyConn.Open ConnectionString:=strConn, _
>                 UserID:=txtLogin.Text, Password:=txtPass.Text
>     rst.Open "select * from ContactInfo", MyConn, adOpenKeyset,
> adLockOptimistic
>     Do While Not rst.EOF
>         a = rst![Business Address 1]
>         If InStr(a, Chr$(13) & Chr$(10)) Then
>             rst![Business Address 1] = Replace(a, Chr$(13) & Chr$(10),
> txtReplaceChar)
>         End If
>         rst.Save
>         rst.MoveNext
>     Loop
>     rst.Close
>     MyConn.Close

> If I take out the rst.Save line the code works.

> I just thought that once I supplied the correct login info to the db
> that I could write if that login had the rights to do so.

> Let me know if u have any ideas or have code that works for this
> issue...

> Thanks!

> Rob
> Please refrain from emailing me so the other
> group members can gain from the info as well...

> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
==----------
>    http://www.newsfeed.com       The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers

=-----


Sat, 01 Jan 2005 23:11:54 GMT  
 VB6, ADO, and writing to an Access 2000 db with user level security
The Update method doesn't work.

On Tue, 16 Jul 2002 16:11:54 +0100, "Chris Paterson"

Quote:

>The Save method shouldn't be there. That's for saving (exporting) the
>recordset to a file - all you want to do is talk to the table in the
>database. Use the Update method instead.

> - Chris Paterson



>> I posted before without full and accurate information, so here we go
>> again.

>> This Access 2K db is using user level security (secured.mdw).

>> I already found this article during my searches, but it doesn't
>> address my issue of not being able to write to the db
>> (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q191754)

>> I can log into the db using ADO and query info, but can't write to it
>> even if using a person with admin rights.

>> I have MDAC 2.7 and Jet 4.0 SP6 installed.

>> The error I receive on the rst.save line is:
>> Run-time Error
>> -2147286781 (80030103)
>> Can't Save

>> I searched the web, MS, and Google and can't find any ideas for this
>> code to not work.

>> Here's the code I have that lets me at least query the db and runs
>> with no errors UNTIL it hits the rst.Save line:
>>     Dim MyConn As New ADODB.Connection, rst As ADODB.Recordset
>>     Dim strConn As String
>>     Set rst = New ADODB.Recordset
>>     strConn = "Data Source=" & txtMDB.Text & ";" & _
>>               "Jet OLEDB:System database=" & txtMDW.Text
>>     MyConn.Provider = "Microsoft.Jet.OLEDB.4.0"
>>     MyConn.Open ConnectionString:=strConn, _
>>                 UserID:=txtLogin.Text, Password:=txtPass.Text
>>     rst.Open "select * from ContactInfo", MyConn, adOpenKeyset,
>> adLockOptimistic
>>     Do While Not rst.EOF
>>         a = rst![Business Address 1]
>>         If InStr(a, Chr$(13) & Chr$(10)) Then
>>             rst![Business Address 1] = Replace(a, Chr$(13) & Chr$(10),
>> txtReplaceChar)
>>         End If
>>         rst.Save
>>         rst.MoveNext
>>     Loop
>>     rst.Close
>>     MyConn.Close

>> If I take out the rst.Save line the code works.

>> I just thought that once I supplied the correct login info to the db
>> that I could write if that login had the rights to do so.

>> Let me know if u have any ideas or have code that works for this
>> issue...

>> Thanks!

>> Rob
>> Please refrain from emailing me so the other
>> group members can gain from the info as well...

>> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
>==----------
>>    http://www.newsfeed.com       The #1 Newsgroup Service in the World!
>> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
>=-----

Please refrain from emailing me so the other
group members can gain from the info as well...

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----



Sun, 02 Jan 2005 09:17:48 GMT  
 VB6, ADO, and writing to an Access 2000 db with user level security
What do you mean, "doesn't work"? Has no effect, or raises an error message?
If the latter, which error message?

 - Chris Paterson


Quote:
> The Update method doesn't work.

> On Tue, 16 Jul 2002 16:11:54 +0100, "Chris Paterson"

> >The Save method shouldn't be there. That's for saving (exporting) the
> >recordset to a file - all you want to do is talk to the table in the
> >database. Use the Update method instead.

> > - Chris Paterson



> >> I posted before without full and accurate information, so here we go
> >> again.

> >> This Access 2K db is using user level security (secured.mdw).

> >> I already found this article during my searches, but it doesn't
> >> address my issue of not being able to write to the db
> >> (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q191754)

> >> I can log into the db using ADO and query info, but can't write to it
> >> even if using a person with admin rights.

> >> I have MDAC 2.7 and Jet 4.0 SP6 installed.

> >> The error I receive on the rst.save line is:
> >> Run-time Error
> >> -2147286781 (80030103)
> >> Can't Save

> >> I searched the web, MS, and Google and can't find any ideas for this
> >> code to not work.

> >> Here's the code I have that lets me at least query the db and runs
> >> with no errors UNTIL it hits the rst.Save line:
> >>     Dim MyConn As New ADODB.Connection, rst As ADODB.Recordset
> >>     Dim strConn As String
> >>     Set rst = New ADODB.Recordset
> >>     strConn = "Data Source=" & txtMDB.Text & ";" & _
> >>               "Jet OLEDB:System database=" & txtMDW.Text
> >>     MyConn.Provider = "Microsoft.Jet.OLEDB.4.0"
> >>     MyConn.Open ConnectionString:=strConn, _
> >>                 UserID:=txtLogin.Text, Password:=txtPass.Text
> >>     rst.Open "select * from ContactInfo", MyConn, adOpenKeyset,
> >> adLockOptimistic
> >>     Do While Not rst.EOF
> >>         a = rst![Business Address 1]
> >>         If InStr(a, Chr$(13) & Chr$(10)) Then
> >>             rst![Business Address 1] = Replace(a, Chr$(13) & Chr$(10),
> >> txtReplaceChar)
> >>         End If
> >>         rst.Save
> >>         rst.MoveNext
> >>     Loop
> >>     rst.Close
> >>     MyConn.Close

> >> If I take out the rst.Save line the code works.

> >> I just thought that once I supplied the correct login info to the db
> >> that I could write if that login had the rights to do so.

> >> Let me know if u have any ideas or have code that works for this
> >> issue...

> >> Thanks!

> >> Rob
> >> Please refrain from emailing me so the other
> >> group members can gain from the info as well...

> >> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
> >==----------
> >>    http://www.newsfeed.com       The #1 Newsgroup Service in the World!
> >> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
> >=-----

> Please refrain from emailing me so the other
> group members can gain from the info as well...

> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
==----------
>    http://www.newsfeed.com       The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers

=-----


Sun, 02 Jan 2005 09:27:11 GMT  
 VB6, ADO, and writing to an Access 2000 db with user level security
I just got it working and now I'm trying to figure out why...the
Update method DOES work.

Thanks for your help!

Rob

On Wed, 17 Jul 2002 02:27:11 +0100, "Chris Paterson"

Quote:

>What do you mean, "doesn't work"? Has no effect, or raises an error message?
>If the latter, which error message?

> - Chris Paterson



>> The Update method doesn't work.

>> On Tue, 16 Jul 2002 16:11:54 +0100, "Chris Paterson"

>> >The Save method shouldn't be there. That's for saving (exporting) the
>> >recordset to a file - all you want to do is talk to the table in the
>> >database. Use the Update method instead.

>> > - Chris Paterson



>> >> I posted before without full and accurate information, so here we go
>> >> again.

>> >> This Access 2K db is using user level security (secured.mdw).

>> >> I already found this article during my searches, but it doesn't
>> >> address my issue of not being able to write to the db
>> >> (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q191754)

>> >> I can log into the db using ADO and query info, but can't write to it
>> >> even if using a person with admin rights.

>> >> I have MDAC 2.7 and Jet 4.0 SP6 installed.

>> >> The error I receive on the rst.save line is:
>> >> Run-time Error
>> >> -2147286781 (80030103)
>> >> Can't Save

>> >> I searched the web, MS, and Google and can't find any ideas for this
>> >> code to not work.

>> >> Here's the code I have that lets me at least query the db and runs
>> >> with no errors UNTIL it hits the rst.Save line:
>> >>     Dim MyConn As New ADODB.Connection, rst As ADODB.Recordset
>> >>     Dim strConn As String
>> >>     Set rst = New ADODB.Recordset
>> >>     strConn = "Data Source=" & txtMDB.Text & ";" & _
>> >>               "Jet OLEDB:System database=" & txtMDW.Text
>> >>     MyConn.Provider = "Microsoft.Jet.OLEDB.4.0"
>> >>     MyConn.Open ConnectionString:=strConn, _
>> >>                 UserID:=txtLogin.Text, Password:=txtPass.Text
>> >>     rst.Open "select * from ContactInfo", MyConn, adOpenKeyset,
>> >> adLockOptimistic
>> >>     Do While Not rst.EOF
>> >>         a = rst![Business Address 1]
>> >>         If InStr(a, Chr$(13) & Chr$(10)) Then
>> >>             rst![Business Address 1] = Replace(a, Chr$(13) & Chr$(10),
>> >> txtReplaceChar)
>> >>         End If
>> >>         rst.Save
>> >>         rst.MoveNext
>> >>     Loop
>> >>     rst.Close
>> >>     MyConn.Close

>> >> If I take out the rst.Save line the code works.

>> >> I just thought that once I supplied the correct login info to the db
>> >> that I could write if that login had the rights to do so.

>> >> Let me know if u have any ideas or have code that works for this
>> >> issue...

>> >> Thanks!

>> >> Rob
>> >> Please refrain from emailing me so the other
>> >> group members can gain from the info as well...

>> >> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
>> >==----------
>> >>    http://www.newsfeed.com       The #1 Newsgroup Service in the World!
>> >> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
>> >=-----

>> Please refrain from emailing me so the other
>> group members can gain from the info as well...

>> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
>==----------
>>    http://www.newsfeed.com       The #1 Newsgroup Service in the World!
>> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
>=-----

Please refrain from emailing me so the other
group members can gain from the info as well...

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----



Mon, 03 Jan 2005 09:16:20 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Convert Access 97 db to Access 2000 db in VB6

2. Q:VB6 ADO and ACCESS 2000 db

3. ADO, Access 2000, VB6, and Multi-Users

4. HELP: ADO Connection String - User Level Security...

5. Using a Data Control in VB5 accessing a user-level secure Access 97 DB

6. Access 2000 Security VS. Access XP Security

7. Access User Level Security HELP!!

8. Opening an Access file with the User Level security feature

9. Access 2000 database in VB6 - no write access

10. display chinese using DAO 3.6/VB6 in accessing Access 2000 DB.

11. Can't access db in Access 2000 using ADO

12. Access - User-Level Security?

 

 
Powered by phpBB® Forum Software