Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC:DBI SQL Query

Status
Not open for further replies.

bknox

Technical User
Apr 13, 2004
30
0
0
US
I have minor question regarding perl and ODBC. I have multiple scripts that access, query, and modify an Access DB. I am using DBI:ODBC to accomplish this. Everything is working perfectly, except that I have found a minor quirk in PERL, and was wondering if anyone had any insight into the problem. I am moving from script to script outputting HTML with results from a given query, in drop down boxes, plain text...etc. I have one particular script that gets called whenever I want to update a particular table in the DB. I run through the script without an problems, then return to the original script that called me. I accomplish this by moving to a separate page that outputs the values that was just saved and allows a user to return to the previous script via a button. The first time I go through the script it works flawlessly. The second time, the DB doesn't get updated unless I refresh the page that has the text telling the user the update was successful. I refresh everything works, I don't refresh the changes never get made to the DB. Any insight would be helpful.


Ben
 
You have to "call" the webserver with your intentions, your notion on refresh makes all A-OK. Sounds like CGI needs to be rediscovered country.

The vars you're passing aren't updating, are your initial fields (data) part of the form you're submitting?

"quirk in Perl" -- you wouldn't be the first I'd imagine, though given the value of independent software arbitration that is inherent in Perl, I'd be inclined to surmise that the error lies elsewhere ...

--Paul
 
Thanks Paul for all your help. I got the script to script error's solved by transforming all my DSN connections to DBI connections instead of Win32::ODBC.

All the data is coming from a form that is submitted. The form is simply two text fields that need to be added to a DB table.

Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top