473,498 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cerating new record using ADO


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
1 6526
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
4445
by: Rick | last post by:
Hi all, Is there a MySQL function to get the first record through a query? I would like to open a page of client records with the first one shown. The other records can be accessed from a...
4
4718
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
5
4315
by: Ilan Sebba | last post by:
When it comes to adding records in related tables, Access is really smart. But when I try to do the same using ADO, I am really stupid. Say I have two parent tables (eg Course, Student) and one...
2
12505
by: aaj | last post by:
Hi all I have a small but rather annoying problem with continuos forms, and am wondering if anyone can suggest a method of getting over it. The front end is Access 2002 with the BE being SQL...
4
2188
by: James P. | last post by:
Hello there, I have a bound-form using Navigator so that the user can move back and forth to update record in the form. Every time a record was modified and the user clicks the Navigator to...
1
5387
by: Scott269 | last post by:
So I've got an old MS Works database I imported into Access. I needed a primary key so I created a record number field that was just the record number I manually inserted when I entered it in the...
2
2417
by: Mark Reed | last post by:
Hi All, I have created a multi-user application at work which is working perfectly apart from a small problem which I believe to more a of a user issue (maybe some will set me straight on that...
5
3470
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record...
10
12649
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
0
7121
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6993
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7162
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7375
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.