Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
MonkeyHanger
Starting Member
5 Posts |
Posted - 2007-03-28 : 09:49:35
|
I am trying to add a new record to my SQL Server.I have a searchstring which I know works. My connection works, however I am recieving a runtime error '3251':Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.I have used to code below for other tables in the same SQL server and they work fine.RSDBCable.Open SearchString, cnConnect, adOpenKeyset, adLockOptimisticAs far as I can tell the tables in the server all have the same permission settings.Can anyone tell me how to fix this problem? |
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2007-03-28 : 11:39:17
|
why aren't you using StoredProcedures to update at the server end?why update recordsets locally at the client (at all)?....I don't understand the need/will to do this so if you know better please educate me? |
|
|
MonkeyHanger
Starting Member
5 Posts |
Posted - 2007-03-29 : 03:02:43
|
I am trying to add a new record to the table in the server. However, after retrieving the recordset, I am unable to addnew! Do you suggest that this is done by using a stored procedure? Why would my numerous other "addnew" statements work but not this one? |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2007-03-29 : 07:59:47
|
It's a good practice to do all database access via stored procedures....from a performance + security standpoint.re other addnew statements....is there a join in the generation of this record set?inserts/updates can only work on 1 table at a time?...maybe the others only includes 1 table. |
|
|
MonkeyHanger
Starting Member
5 Posts |
Posted - 2007-03-29 : 10:51:00
|
The query does not include joins. It is a very simple check to see if data exists with the parameters entered by the user. If they dont (and they shouldnt) a new record is created and populated with the data. |
|
|
|
|
|