By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,461 Members | 2,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,461 IT Pros & Developers. It's quick & easy.

Cerating new record using ADO

P: n/a

Hi, i wont to create new record in remote accsess db using ADO. I'm
using this code:

Dim cnn As ADODB.Connection

Dim rs As ADODB.Recordset

Set cnn = New ADODB.Connection

Set rs = New ADODB.Recordset

cnn.Open "Provider=MS Remote;Remote Server=http://www.xyx.com;" &
"Remote Provider=Microsoft.Jet.OLEDB.4.0;" & "Data
Source=c:\Inetpub\wwwroot\biblio.mdb;"

rs.Open "SELECT * From USERS", cnn, adOpenDynamic, adLockBatchOptimistic

rs.AddNew

rs("NAME") = "Jon"

rs("PHONENR") = "004900145245"

rs.Update

MsgBox rs.RecordCount

everything is ok, but untill my programm running. After new connection i
detected that record was not addet. Whats wrong?



PS. Sorry form my English.
--
Posted via http://dbforums.com
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If you are getting connected, then it sounds like the permissions on the
file may be set to "read only".

There could be many possible reasons. How close are you to the database?
Do you have network access to the file or is it hosted by your ISP?

"fizikas" <me*********@dbforums.com> wrote in message
news:35****************@dbforums.com...

Hi, i wont to create new record in remote accsess db using ADO. I'm
using this code:

Dim cnn As ADODB.Connection

Dim rs As ADODB.Recordset

Set cnn = New ADODB.Connection

Set rs = New ADODB.Recordset

cnn.Open "Provider=MS Remote;Remote Server=http://www.xyx.com;" &
"Remote Provider=Microsoft.Jet.OLEDB.4.0;" & "Data
Source=c:\Inetpub\wwwroot\biblio.mdb;"

rs.Open "SELECT * From USERS", cnn, adOpenDynamic, adLockBatchOptimistic

rs.AddNew

rs("NAME") = "Jon"

rs("PHONENR") = "004900145245"

rs.Update

MsgBox rs.RecordCount

everything is ok, but untill my programm running. After new connection i
detected that record was not addet. Whats wrong?



PS. Sorry form my English.
--
Posted via http://dbforums.com

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.