Jump to content

Question about direct SQL access in autoit (beta)


Recommended Posts

Hello,

I played around with code scriptkitty posted at this topic:

http://www.autoitscript.com/forum/index.ph...572entry77572

I could get successfull connections to different ODBC sources with this (for example MySQL). The script is nearly exactly what I need so I tried to modify it to fit my needs.

Normaly I don´t use the beta so I am not used to the new COM Extensions.

I have problems to understand this part:

If .RecordCount Then
$count=0
While Not .EOF
   $count=$count+1
   tooltip("record search #" & $count & @crlf & $cmboVal,0,0)
$cmboVal = $cmboVal & "" & .Fields("name").Value & "|" & .Fields("phone").Value & "|" & .Fields("address").Value & @cr
.MoveNext
WEnd

I need it to just "dump" all fields in the table of a database separated bei "|".

How can I do it, if I don´t want to change everytime the .Fields("something") thing?

Is there a way to find out how many .Fields exist and what there names are?

Perhaps someone can push me in the right direction? I did not find something usefull about this "adodb" object.

commenti

Link to comment
Share on other sites

The right direction for information here is the MSDN website. You'll find information specific to recordsets here Recordset Object

Without being familiar with COM and the Microsoft Object models you are going to have a lot of trouble with this unless you can just get someone to write what you need for you.

That said, the code you include should get you pretty close. Some hits are that there is a Fields Collection that has a Count property. Also, the Field objects (included in the Fields collection) have a .Name property.

Hope this helps,

Dale

Edit: fixed typo and removed copy of base post.

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Hi Dale,

That said, the code you include should get you pretty close.  Some hits are that there is a Fields Collection that has a Count property.  Also, the Field objects (included in the Fields collection) have a .Name property.

Hope this helps,

Thank you, this was really helpfull seems you pushed me in the right direction. The link on MSDN for "Recordset Object" is really helpfull. Seems the Fields Collection properties are just what I need. I think I can figure out how to get this working now.

Greetings

commenti

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