Access violation

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
liveitupmore
Junior Coder
Posts: 22
Joined: Wed Nov 16, 2005 3:58 am
Location: Gold Coast, Australia

Access violation

Post by liveitupmore » Wed Jul 10, 2013 4:15 am

I'm getting an access violation when trying to perform an SQL query using the DBExec function. The field PIPCODE is 20 (char), PILOCATION is 15 (char) and PIQTYORD is 9 (num).

The error message is Access violation at address 005C003C in module 'msched.exe'. Read of address 00000001.

The parameters for the query have been evaluated by the debugger and shown below. Using the debugger and stepping through the multiple iterations of the script a line that does work has the query.

Code: Select all

SQL=select PIQTYORD from D22RTNIT WHERE ((PIPCODE = '43076 GG') and (PILOCATION = '1310'))

the following line fails

Code: Select all

SQL=select PIQTYORD from D22RTNIT WHERE ((PIPCODE = '01003 NDC') and (PILOCATION = '1327'))

I understand that the query may fail to return a result or the query may complain that the query parameters not being the correct type, but I cannot see why an access violation.

The macro fails every time at the same point.

Any clues ??

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 15, 2013 2:13 pm

Not sure why this would be. I guess to reproduce we need to mirror the database set up. What kind of database is it? Is it something we can setup here?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts