Results 1 to 4 of 4

Thread: setar ARITHABORT como ON no SELECT

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2020
    Posts
    4

    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...

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,525

    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?

  3. #3
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,734

    Re: setar ARITHABORT como ON no SELECT

    You have to use English, like all other threads and posts on this forum.

  4. #4
    Hyperactive Member
    Join Date
    Jan 2018
    Posts
    340

    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
  •  



Click Here to Expand Forum to Full Width