setar ARITHABORT como ON no SELECT
no T-SQL seto o ARITHABORT como ON
SET ARITHABORT ON
A Consulta funciona normal...
Porem preciso usar essa consulta no vb6... quando uso a consulta diz que o ARITHABORT não está setado.
Como eu faria para setar ele na linha de código do VB6?
Eu tentei assim e não deu certo!
"SELECT SESSIONPROPERTY('ARITHABORT') AS ARITHABORT, OS_recapadora.FABRICANTE, OS_recapadora.ANO...
Re: setar ARITHABORT como ON no SELECT
A Consultation works normal ...
So I need to use this query not vb6 ... when using the query it says that ARITHABORT is not set.
How can I set the VB6 code line?
Re: setar ARITHABORT como ON no SELECT
You have to use English, like all other threads and posts on this forum.
Re: setar ARITHABORT como ON no SELECT
Code:
Dim oConn As New ADODB.Connection
Dim oSet As New ADODB.Recordset
oConn.Open "Provider=MSOLEDBSQL;Server=..."
Set oSet = oConn.Execute("SELECT SESSIONPROPERTY('ARITHABORT') AS ARITHABORT")
Debug.Print oSet!ARITHABORT ' = 0
oConn.Execute ("SET ARITHABORT ON")
Set oSet = oConn.Execute("SELECT SESSIONPROPERTY('ARITHABORT') AS ARITHABORT")
Debug.Print oSet!ARITHABORT ' = 1
oConn.Close
It works fine for me.:confused:
This is a session parameter, so it will only be in effect for the current connection.