|
-
Jan 6th, 2021, 11:55 AM
#1
Thread Starter
New Member
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...
-
Jan 6th, 2021, 12:29 PM
#2
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?
-
Jan 6th, 2021, 12:37 PM
#3
Re: setar ARITHABORT como ON no SELECT
You have to use English, like all other threads and posts on this forum.
-
Jan 6th, 2021, 06:24 PM
#4
Hyperactive Member
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.
This is a session parameter, so it will only be in effect for the current connection.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|