IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#18982 - 05/19/07 11:11 PM Using SQL UPDATE command
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
Does PlanetPress Database support any other SQL commands besides SELECT?
I'm using the Dynamic SQL feature to try to update a DB with a date for reconciliation purposes (printing checks). I get an error when I step through it in debug. Here's the SQL statement I'm using:

Code:
 UPDATE [planetpress] SET [dateprinted] = '%m\%d\%y' WHERE [vendor_number] = '@(1,6,6,19,29,KeepCase,Trim)' 
Again the purpose is to update a DB with the date a certain check printed based upon the vendor number.

Here's the error I get in Watch debug mode:

W3612 : Error running SQL: [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

Is it something I'm doing wrong with syntax?

Watch version is 5.3.4.2644

Does V6 have more capability in it's DB plugin?

Thanks,
-nth-

Top
#18983 - 05/21/07 11:14 AM Re: Using SQL UPDATE command
-nth- Offline
OL Expert

Registered: 04/01/03
Posts: 236
Loc: Lincoln, NE
Ok, I got a little further, but my original question still stands about using a SQL UPDATE command.

I changed my SQL statement to this:

Code:
UPDATE [planetpress] SET [dateprinted] = '%m%d%y' WHERE [vendor_number] = '%2'
Evidently the DB plugin likes job info variables a little better than direct data references.

The statement works, it updates the proper table and column but it returns this error:

W3612 : Error running SQL: CommandText does not return a result set

So I'm thinking the DB plugin is designed to return results to PlanetPress vs. push data out to databases. It would be nice though, to have all the SQL commands available through the dynamic SQL tab and not have it return an error.

Am I still doing something wrong with syntax?

Thanks,

-nth-

Top
#18984 - 05/22/07 09:52 AM Re: Using SQL UPDATE command
Anonymous
Unregistered


Hello,

The DB plug-in was built for SELECT statements and will always expect a record set being returned. However, what you are receiving is a warning only and can be ignored (I use the DB plug-in myself for something similiar and get the same message, which I ignore).

You should notice that your command does in fact execute correctly.

Top
#18985 - 08/22/08 04:07 PM Re: Using SQL UPDATE command
rheinold Offline
OL Newbie

Registered: 11/01/00
Posts: 7
Loc: Kansas City, KS USA
Is there a way using the Update command to verify that the database plugin in fact found your search criteria and performed the update? In other words is there a way to get a return notification that it did or did not find and update the cooresponding record.

Top