Greetings,

I am having a definate challenge adding and modifying data. The below code will work ONE time and then NOT work again for the session. I must leave the website and return in order for it to add a new record. I have use two DNS less connection method to no avail. I have looked at numerous forums - nothing. If I remove the write permission form the file I will receive an error on the 2d attempt to write to the database in the same session.


I do not believe that it is the code. The reason - I have other websites sitting on the same server and they operate correctly with similar code.

What could be the problem? Session variables? (I have about 100), Hidden characters? I receive NO errors, even though the code does not work.



************************************************** ***********
Code Snippet
************************************************** ***********

Dim DataConn, slctClient, SQL

Set DataConn = Server.CreateObject("ADODB.Connection&#34

(option a) DataConn.Open "DBQ=" & Server.Mappath("..dataClient.mdb&#34 & ";Driver={Microsoft Access Driver (*.mdb)};"
(option b) DataConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.Mappath("..dataClient.mdb&#34

SQL = "SELECT * FROM Table"
Set slctClient = Server.CreateObject("ADODB.Recordset&#34
slctClient.Open SQL, DataConn, 3, 3, 1

SlctClient.AddNew
slctClient.Fields("ClientLastName&#34 = Session("ClientLastName&#34
slctClient.Fields("ClientSSN&#34 = Session("ClientSSN&#34
slctClient.Fields("ClientPassword&#34 = Session("ClientPassword&#34
slctClient.Update

slctClient.Close
Set slctClient = nothing

DataConn.Close
Set DataConn = nothing

************************************************** ***********
************************************************** ***********