View Full Version : write session variables to access database
12-08-2007, 02:43 PM
I have a load of info that a user has entered, it is in the form of session variables. Can anyone point me in the direction of how I can write that information back to an accesss database?
12-08-2007, 03:56 PM
Em I think you would have to extract the data from the MySQL database into a csv format using a tool like MySQL query browser :)
12-08-2007, 04:25 PM
I don't want to retrieve the info, I want to write it to the database
12-08-2007, 05:22 PM
As far as I am aware php can't write to a microsoft product directly. You'd need ASP to do that perhaps
12-08-2007, 07:43 PM
sorry dude...but this is the ASP forum and I mentioned in my first post about writing TO a databse...it seems like you are answering someone elses question.
I am using ASP and not PHP....thanks for the effort though
12-08-2007, 07:52 PM
now that wasn't very clever of me was it :(
12-10-2007, 10:10 AM
What are you having trouble with, exactly? Connecting to a database? Using session variables? You just need to construct a SQL statement, open a connection and execute the statement:
strSQL = "INSERT INTO table (field) VALUES ('" & session("mySessionKey") & "')"
set oCn = server.createObject("ADODB.Connection")
set oCn = nothing
12-11-2007, 09:21 AM
Spud, it sounds like his biggest issue is figuring out how to parse the session string into its individual parts so it can be inserted into the database.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.