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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extremely Weird Problem

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
Guys,

This might be a difficult one to explain but I'll try my best. I have a VBScript program which I run every night using Windows Script Host and the purpose of this script is to pull data from a number of Pervasive 2000 tables and write the data to corresponding tables in an Access DB. There are 18 tables in total. To do this, I run one VbScript program which fires 18 child processes to run 18 further VBScript programs which updates each table in turn.

That's the straightforward part. Now comes the problem. Initially, I had this running on my machine and pulling the data over the network. However, this meant that I had to leave my PC on every night so I moved the programs every night. So I moved them all on to the server where the DB resides. Now, 4 of the programs fail and always at the same line of Data and always when writing the data to the access table. It always writes some data to the table so DSN's, etc are OK. However, these programs never fail when run from my PC. Can anyone suggest why? Mise Le Meas,

Mighty :)
 
What errors do the programs fail with? Does the Access portion of the program use ODBC as well? If so, turn on ODBC tracing. That should help determine what the real error is. Is anything happening on the server itself at the time the programs are running?
Mirtheil
mirtheil@mirtheil.com
Custom VB and Btrieve development.
 
The programs fail with a syntax error in the sql command. The SQl command is incorrect and it is because it seems to stop creating it after accessing one of the recordset fields. Again, this works every single time from my own PC.
The sql insert command ends with the data from a certain field but doesn't add the closing quote for that field or any of the subsequent fields. However, the program doesn't stop with an error either.

I am using ODBC on the access portion.

Nothing else is happening on the server at the same time. Mise Le Meas,

Mighty :)
 
Are you starting the programs manually on the server or is something running them? If you've got a program starting them, does starting them manually at the server cause the same error? It might be something related to permissions.
Mirtheil
mirtheil@mirtheil.com
Custom VB and Btrieve development.
 
I have tried running it manually and firing it from a scheduling program and it fails regardless. I don't see how it can be a permissions problem as all the programs write to the same database and only 4 of them are failing. In addition, in the case of one of the 4 programs, it fails after writing 17,000 records.

I'm baffled. I now have all those programs scheduled on my machine again and they have run successfully every night. It's a pain inthe ass though as it means leaving my PC powered on. Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top