If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Pervasive SQL equivalent for MSSQL RAISERROR?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-17-10, 06:52
Mynx Mynx is offline
Registered User
 
Join Date: Mar 2007
Posts: 56
Pervasive SQL equivalent for MSSQL RAISERROR?

Hey there guys. Not sure where else to go for answers - after google, dbforums has often been my saving grace for MSSQL. However, this time I've had to try and do a trigger using Pervasive SQL -aaaaargh!!! Coming from an MSSQL background I have found this highly frustrating.

Soooo....
does anyone know of a Pervasive SQL equivalent for MSSQL RAISERROR? Or perhaps a workaround? I've gone through all the documentation on Pervasive that I can find and I'm just not having any joy.

Thanks!
__________________
Puppies and cheesecake.
Reply With Quote
  #2 (permalink)  
Old 03-17-10, 12:00
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,015
What exactly are you trying to do? There is not direct equivalent to RAISEERROR but there might be a workaround depending on what you are trying to do. Also, what version of PSQL are you using?
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #3 (permalink)  
Old 03-17-10, 13:12
Mynx Mynx is offline
Registered User
 
Join Date: Mar 2007
Posts: 56
Well I'm trying to interact with a program using Pervasive SQL.

It is an accounting package where the client does invoicing, but it allows them to duplicate invoice numbers. I've done something similar on MSSQL where I write a trigger to stop the transaction from occurring and then raising an error message on the program that tells the client that he cannot continue as there is a duplicate.

So basically a trigger to stop the transaction from happening, but telling the client the reason.
__________________
Puppies and cheesecake.
Reply With Quote
  #4 (permalink)  
Old 03-17-10, 13:18
mirtheil mirtheil is offline
Registered User
 
Join Date: Dec 2001
Posts: 1,015
Probably not going to work. PSQL supports triggers but once created, they disable access through the Btrieve interface for that operation (a Delete trigger disables delete operations through Btrieve). It's very possible the accounting software uses Btrieve so the Trigger option won't help.
It might be worth contacting the vendor of the application to find out if there's an update to the program to prevent duplicate invoice numbers.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Reply With Quote
  #5 (permalink)  
Old 03-18-10, 04:31
Mynx Mynx is offline
Registered User
 
Join Date: Mar 2007
Posts: 56

Unfortunately not. The company that does the software say that they make it that way for other reasons/clients. Hence the reason I was asked if I could do something. And having done something similar in MSSQL my boss "naturally" assumes that I can perform miracles in Pervasive SQL.... Oh the uneducated lament of not all SQLs are created equal! :P
__________________
Puppies and cheesecake.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On