Jump to content

Query result


Recommended Posts

Hello,

I need help for my script... I'm lost..

 

I make a SQL request on my Acces DB, ok it's running and my result is $RS1

$query_logo_niveau = "SELECT logo.niveau FROM logo where logo.num_col = '" & Guictrlread($numcol) & "';"



         $AdoCon2 = ObjCreate("ADODB.Recordset")
         $AdoCon2.ActiveConnection = $AdoCon
         $AdoCon2.Open($query_logo_niveau)
         $RS2 = $AdoCon2.getstring()

MsgBox(0, "result $RS2", $RS2)
FileWrite("rs2.txt", $RS2)

 

But my result $RS1 are :

in txt file : " 6  5  7  3  2  1"

in msgbox : (see png join)

 

I want to set each different value of my results query in string/variable

how can i do ?

 

Thank you so much

Sorry for my english

Capture.PNG

rs2.txt

Link to comment
Share on other sites

Something like this maybe?

#include <Array.au3>
$query_logo_niveau = "SELECT logo.niveau FROM logo where logo.num_col = '" & Guictrlread($numcol) & "';"
    $AdoCon2 = ObjCreate("ADODB.Recordset")
    $AdoCon2.ActiveConnection = $AdoCon
    $AdoCon2.Open($query_logo_niveau)
    $RS2 = $AdoCon2.getstring()
    $aRS2 = StringSplit($RS2, @CR)
_ArrayDisplay($aRS2)

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...