how to use "SET ARITHABORT ON" in vb6

Asked

Viewed 32 times

-2

Good afternoon Personal,

I needed to use some commands to concatenate some records in a query...

So far so good, I did it that way and it worked:

SET ARITHABORT ON; 

SELECT COALESCE((SELECT CAST(FABRICANTE AS VARCHAR(10)) + '/' + CAST(MODELO AS VARCHAR(10)) + '/'  + CAST(ANO AS VARCHAR(10))  AS [text()] FROM OS_recapadora AS O WHERE O.COD_OS = C.COD_OS ORDER BY COD_OS FOR XML PATH(''), TYPE).value('.[1]', 'VARCHAR(MAX)'), '') AS Produtos
FROM  OS_recapadora  AS C GROUP BY COD_OS;

On SQL Server I can run normally...

However, I need to use this in VB6.... I never used the command "SET ARITHABORT ON" in vb6.. then when I type in the vb6 "SET ARITHABORT ON" it turns red as if it were a wrong command.

  • Hello WEBIER. This command is from Sqlserver and not from VB6, and it is not clear where it is getting in red, if it is in the text editor, this has nothing to do with the execution, there are things that some Highlight do not recognize, but I do not know if it is in the editor that you refer, the question is not clear.

  • She went red in the six.... used in sql server and ran normal... now in vb6 not accepted... as would use SET ARITHABORT ON in vb6 direct in code line

  • Hello, as I already said, this is not VB6 command and turning red does not make sense, the only place that would turn red is in a text editor, what has nothing to do with code execution, simply what you say does not make sense, you are probably confusing something or not understanding the basics of how the execution occurs.

  • Friend, just what I want to know... I need to set "ARITHABORT" as "ON" within Select on VB6.... because I need to make a query where I need it to be ON... the query via T-SQL works normal(SET ARITHABORT ON)... but I need to use this query in VB6

  • Okay, but inside VB6 without showing the code we have no way to understand what was done and if it is actually a syntax error or if it is simply in your text editor that appears in red, your question lacks several details. You have to put yourself in the place of the people who will try to help you and provide the details in the body of the question, at the moment use the [Edit] link and explain exactly how you are doing step by step. Thank you for understanding.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.