pnjones
Posts: 42
|
| Posted: 12/17/2006, 4:23 PM |
|
I am trying to add data to an access table and have tried to use the CCOpenRS but get the message the Quote :Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
I have searched the forum and cant find where the code is wrong. My code is show below and fails on the line .AddNew , what am i doing wrong ?
Quote :
ccopenrs Recordset,SQL,DBDBConn.Connection,true
Recordset.Addnew
Recordset.Fields("L_Product")=tmpProduct
Recordset.Update
RecordSet.Close
Thanks for your help
_________________
Regards
Pat |
 |
 |
webdev
Posts: 19
|
| Posted: 12/25/2006, 9:51 AM |
|
You might like to check the permissions on the file and folder where the mdb file resides.
|
 |
 |
pnjones
Posts: 42
|
| Posted: 12/28/2006, 3:58 PM |
|
I can already maintain the database online and have full rights to the folder
_________________
Regards
Pat |
 |
 |
Edd
Posts: 547
|
| Posted: 12/28/2006, 4:23 PM |
|
Pat,
Two things:
1. Debug / Response.write out your variables SQL and DBDBConn.Connection to verify completeness, e.g. your connection may not contain a userid and password.
2. Consider using in line SQL as an alternative.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |
pnjones
Posts: 42
|
| Posted: 12/28/2006, 5:25 PM |
|
No joy the sql is correct but the connection is the problem.
How do i use "in line SQL" ?
My connection is called DBConn i have tried DBConn.Execute("sql....") but no errors and no data is added to the table
_________________
Regards
Pat |
 |
 |
pnjones
Posts: 42
|
| Posted: 12/28/2006, 5:54 PM |
|
I have debuged this further and got the following error
ADODB.Recordset error '800a0cb3'
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
The response.write on the connection is as follows
Quote :tblLicensesProvider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=E:\data\custlogin.mdb;Mode=Share Deny None;Extended Properties="";Jet OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False
How do i change the lock type from within ccs ?
_________________
Regards
Pat |
 |
 |
Edd
Posts: 547
|
| Posted: 12/28/2006, 7:18 PM |
|
Pat,
By in line SQL I mean execute the SQL statement thru the connection, example:
Dim strSQL
StrSQL = "Insert Into NameOfTable (L_Product) values (" & DBDBConn.ToSQL(tmpProduct, ccs??????) & ")"
DBDBConn.Execute StrSQL
?????? is becase I don't know the data type.
Also check the Yes Software site for freqently asked questions regarding MSACCESS databases. You are NOT alone when it comes to these types of issues.
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
 |
 |