- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
catch Sql Query error
Hello
I want to update a database via the New SQL Query function:
Names Default To Here( 1 );
obj = New SQL Query(
Connection("DB connection string"),
Custom SQL "
UPDATE table
SET Column_1 = 1
where Column_2 = '2'
")
);
Error_Msg = Log capture( obj << Run;);
I get the following error message:
""
Error running SQL Query:
[Server] Invalid object name table
Log Capture only get the empty "" string. So i don't know if the query was successful since it returns an empty string when no error occurs.
simmilar topic but with open database: https://community.jmp.com/t5/Discussions/Catching-database-error-message/m-p/6749#M6743
"I thought about our dilemma, and I came up with a solution that I honestly think works out best for one of both of us"
- GLaDOS
- GLaDOS
11 REPLIES 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: catch Sql Query error
You might want to surround your code with these statements to force all error messages to the log:
batch interactive(1);
<your code>
batch interactive(0);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: catch Sql Query error
Hello @pmroz
THX, I was about to write a new entry because I run into the "JMP alert" message pop up and the log captured didn't work. I found the following entry: Post about JMP alert with your solution.
"I thought about our dilemma, and I came up with a solution that I honestly think works out best for one of both of us"
- GLaDOS
- GLaDOS
- « Previous
-
- 1
- 2
- Next »