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"
(option a) DataConn.Open "DBQ=" & Server.Mappath("..dataClient.mdb" & ";Driver={Microsoft Access Driver (*.mdb)};"
(option b) DataConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & Server.Mappath("..dataClient.mdb"
SQL = "SELECT * FROM Table"
Set slctClient = Server.CreateObject("ADODB.Recordset"
slctClient.Open SQL, DataConn, 3, 3, 1
SlctClient.AddNew
slctClient.Fields("ClientLastName" = Session("ClientLastName"
slctClient.Fields("ClientSSN" = Session("ClientSSN"
slctClient.Fields("ClientPassword" = Session("ClientPassword"
slctClient.Update
slctClient.Close
Set slctClient = nothing
DataConn.Close
Set DataConn = nothing
************************************************** ***********
************************************************** ***********