Jump to content

Direct SQL access in autoit (beta)


Recommended Posts

First off, I didn't make half this code. All I did was grab code posted in other forums and try to make it as simple as possible for folks to understand.

I made a nice GUI and then realised that although it was pretty, it was just adding to the complexity of it.

I chose to do a simple text database (csv) for the easist use.

my text file is named data.csv and contained this sample data

Name,phone,address
bob,800-888-8898,123 main street
sam,800-900-9000,234 1st street

First you will have to set up a data source in windows:

go to control panel

go to administrative tools

go to data sources

go to the system dsn tab ;system is multi user

choose add and pick microsoft text driver

I used data source name of Textdata

I chose to set the directory of my text database files like c:\data

finish up and lets get to the autoit portion

You can set up other ODBC data sources like Access databases and such later once you get the hang of this.

Again, if you don't use the beta version atm, you will get errors with lines like While Not .EOF

; this is a bunch of stuff from various authors combined as simply as possible to
; show how to grab data using autoit and SQL commands.
; Only available in the beta version of autoit at the present time


Opt("TrayIconDebug", 1)     ;0=no info, 1=debug line info
Opt("ExpandEnvStrings", 1)   ;0=don't expand, 1=do expand
Opt("ExpandVarStrings", 1)   ;0=don't expand, 1=do expand

$DSN="DSN=textdata"; typical format
$search=InputBox("Lookup","Give me part of a name to look up","")

$out=getData($DSN)
tooltip("")
MsgBox(1,"search for "& $search, $out)

Func getData($DSN)
; some things are a bit harder to understand in this part
; .Fields("address").Value is the Value of the Field named "address"
; access database would be the same, but you should call out the full table as well
; like .Fields("Tablename.Fieldname").Value
; and EOF is universal for End Of File
$cmboVal =""
$adoCon = ObjCreate ("ADODB.Connection")
$adoCon.Open ($DSN)
$adoRs = ObjCreate ("ADODB.Recordset")
if stringlen($search)>0 then 
   $adoSQL = "SELECT * FROM data.csv where instr(`name`,'" & $search &  "')>0"
  ; note this is a SQL but similar to stringinstr of AutoIt.
  ; it selects everything from the file where it finds a match.
  ; note for an access database you would use tablename instead of the filename.
  ; text based sql is slightly easier. 
Else
   $adoSQL = "SELECT * FROM data.csv"

EndIf

$adoRs.CursorType = 2
$adoRs.LockType = 3
$adoRs.Open($adoSql, $adoCon)

With $adoRs

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

EndIf

EndWith

$adoCon.Close
return $cmboVal
EndFunc

I would suggest the GUI to list your data, and as you noticed, I formatted it to be very easy once you do so, just stringsplit by @cr

Ok, so after doing all this work, you say why not just do a file read?

In a small text database it would be more efficient to do that, but I use this data to query huge databases that contain a few million records. My SQL querys are far more complex than this obviously but it is really a nice feature to know.

You can use text based databases, mysql, access, MSSQL server, oracle, etc.

Tie it to a nice GUI and you are golden.

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Can this be used on mySQL servers?

"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Link to comment
Share on other sites

Can this be used on mySQL servers?

<{POST_SNAPBACK}>

He already claimed that it can. I got it to work with PostgreSQL no problem.

In theory it should work with anything that you can set up as a DSN.

601DisengageEnd Program

Link to comment
Share on other sites

In order to use on MySQL, you need to:

1) be running a MySQL server

2) install the MySQL ODBC driver

3) configure the MySQL driver

Check MySQL.org in the download section. The driver is nice for this, or if you want to convert information from an access database to MySQL.

MySQL has different data types, so you need to be careful, but for AutoIt, it works out nice. Sorry, Binary file type in MySQL will get some wierd results in AutoIt.

One more note, if your MySQL database is on a remote server, many hosts do not allow remote MySQL access. It would not be the driver's fault.

And I have tested this with a simple MySQL database. Worked fine. I mainly ran Select queries, but I will be testing out more Joins, create table querys and such soon. But that is more for the advanced user, and some SQL commannds don'[t really work well with CSV based databases.

As you get into more complex Querys, remember that `, ", and ' are not equal.

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

  • 3 months later...

Hello!

I would suggest the GUI to list your data, and as you noticed, I formatted it to be very easy once you do so, just stringsplit by @cr

Yes indeed this was really usefull.

Really the best example about AutoIt with ODBC Datasources I could find in the forum.

You can use text based databases, mysql, access, MSSQL server, oracle, etc.

Tie it to a nice GUI and you are golden.

That is what I´ve done now, I tied this to a simply gui.

It works the following way:

First select your ODBC Datasource

Second enter your SQL Query

Third: See the results.

Perhaps this is helpfull for someone who want´s to know if scirptkiddy´s great examplescript works with his ODBC Database without having to to edit the code.

Warning: It does not have error handling for the SQL Query. So if you enter a incorrect query it will just close.

Here is the code

; SimpleQuery
; Author: AutoIt forum users and commenti (Maic Striepe)
; most of this stuff is from various author of the AutoIT forum.
; based mostly of this post: http://www.autoitscript.com/forum/index.php?showtopic=11147&st=0&p=77572?entry77572
; Thanx to DaleHohm for pointing me in the right direction where to find more about the adodb object. 
; Only available in the beta version of autoit at the present time

#include <GUIConstants.au3>

opt("TrayIconDebug", 1)    ;0=no info, 1=debug line info
opt("ExpandEnvStrings", 1)  ;0=don't expand, 1=do expand
opt("ExpandVarStrings", 1)  ;0=don't expand, 1=do expand

Dim $ueberschriften = ""
Dim $anzahl = 0
Dim $dsncount = 1
Dim $DSN = ""
Dim $button3

GUICreate("Choose DSN", 420, 250)

$listview = GUICtrlCreateListView("DSN|Type|Description", 10, 10, 400, 200)
$button = GUICtrlCreateButton("OK", 180, 220, 70, 20)

$var = RegEnumVal("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources", $dsncount)
$wert = RegRead("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources", $var)

While $var <> ""
   
   $var = RegEnumVal("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources", $dsncount)
   $wert = RegRead("HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources", $var)
   If $var <> "" Then
      GUICtrlCreateListViewItem($var & "|" & "USER" & "|" & $wert, $listview)
   EndIf
   $dsncount = $dsncount + 1
WEnd

$dsncount = 1
$var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources", $dsncount)
$wert = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\\ODBC Data Sources", $var)

While $var <> ""
   
   $var = RegEnumVal("HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources", $dsncount)
   $wert = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources", $var)
   If $var <> "" Then
      GUICtrlCreateListViewItem($var & "|" & "SYSTEM" & "|" & $wert, $listview)
   EndIf
   $dsncount = $dsncount + 1
WEnd

GUISetState()

While 1
   $msg = GUIGetMsg()
   
   Select
      Case $msg = $button
         $dsnarray = StringSplit((GUICtrlRead(GUICtrlRead($listview), 2)), "|")
         $dsn = "DSN=" & $dsnarray [1]
         ExitLoop
   EndSelect
WEnd

GUIDelete();

GUICreate("Enter your sql-query", 420, 250)
$edit1 = GUICtrlCreateEdit("", 10, 10, 400, 200)
$button2 = GUICtrlCreateButton("OK", 180, 220, 70, 20)
$query = GUICtrlRead($edit1)
GUISetState()

While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $button2
         $query = GUICtrlRead($edit1)
         ExitLoop
   EndSelect
WEnd

$out = getData($DSN)
ToolTip("")
MsgBox(0, "Rows fetched", $out)

While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $button3
         ExitLoop
   EndSelect
WEnd

Func getData($DSN)
  ; some things are a bit harder to understand in this part
  ; .Fields("address").Value is the Value of the Field named "address"
  ; access database would be the same, but you should call out the full table as well
  ; like .Fields("Tablename.Fieldname").Value
  ; and EOF is universal for End Of File
   $cmboVal = ""
   $adoCon = ObjCreate ("ADODB.Connection")
   $adoCon.Open ($DSN)
   $adoRs = ObjCreate ("ADODB.Recordset")
   
   $adoSQL = $query
   
   
   $adoRs.CursorType = 2
   $adoRs.LockType = 3
   $adoRs.Open ($adoSql, $adoCon)
   
   GUICreate("Results", 420, 250)
   $button3 = GUICtrlCreateButton("OK", 180, 220, 70, 20)
   
   With $adoRs
      
     ; Get information about Fields collection
      For $n = 0 To .Fields.Count - 1
         $ueberschriften = $ueberschriften & .Fields ($n).Name & "|"
      Next
      
      $liste = GUICtrlCreateListView(StringTrimRight($ueberschriften, 1), 10, 10, 400, 200, $LVS_REPORT, $LVS_EX_GRIDLINES)
      
      
      If .RecordCount Then
         $count = 0
         While Not .EOF
            $count = $count + 1
            ToolTip("record search #" & $count, 0, 0)
            For $colum = 0 To .Fields.Count - 1
               $cmboVal = $cmboVal & "" & .Fields ($colum).Value & "|"
            Next
            $cmboVal = StringTrimRight($cmboVal, 1) & @CR
            
            GUICtrlCreateListViewItem($cmboVal, $liste)
            $cmboVal = ""
            .MoveNext
         WEnd
         
         GUISetState()
         
      EndIf
      
      
   EndWith
   
   $adoCon.Close
   Return $count
EndFunc  ;==>getData

I know, this can be made better. Code could use some cleanup. Anyway it works, at least on my comp.

commenti

Link to comment
Share on other sites

Hi,

That looks a great idea.

I have a large SQL database ("MSDN"?) which I would like to query, but don't know the table names, or format for the query.

Can you opint me in the right direction to make those queries with your program?

Alternatively, or additionally!;

Can you bring up a GUI that lists, say, the databases on the SQL server, and the tables to query?

Thanks for your thoughts and efforts,

Randall

Link to comment
Share on other sites

Hello!

Yes indeed this was really usefull.

Really the best example about AutoIt with ODBC Datasources I could find in the forum.

That is what I´ve done now, I tied this to a simply gui.

It works the following way:

First select your ODBC Datasource

Second enter your SQL Query

Third: See the results.

Perhaps this is helpfull for someone who want´s to know if scirptkiddy´s great examplescript works with his ODBC Database without having to to edit the code.

Warning: It does not have error handling for the SQL Query. So if you enter a incorrect query it will just close.

This looks great!

I've tried it with a Firebird (www.firebird.org) SQL-server and works like a charm (and fast!)!

Thanks for the code!!!

Arno Rog

Link to comment
Share on other sites

Hello,

Hi,

That looks a great idea.

I have a large SQL database ("MSDN"?) which I would like to query, but don't know the table names, or format for the query.

Can you opint me in the right direction to make those queries with your program?

A simple query to get everything in a table called mytabel would be:

select * from mytable

But u need to know which table to query to do this.

If you would like to lern more about SQL to do querys you could start here:

http://www.w3schools.com/sql/default.asp

Alternatively, or additionally!;

Can you bring up a GUI that lists, say, the databases on the SQL server, and the tables to query?

Thanks for your thoughts and efforts,

Randall

Hm, this would be possible but the code was intended to be just a simple query tool, not a fully fledged one. This is why I called it simple query ;-)

I don´t think I´ll get the time to do what u requests.

Anyway if I get the time perhaps I´ll try to make a query tool that u can use together with the SCITE Editor. Scite has syntax highlighting for SQL so I allways wondered why I could not find a query tool for Scite.

This looks great!

I've tried it with a Firebird (www.firebird.org) SQL-server and works like a charm (and fast!)!

Thanks for the code!!!

No problem, as I said I did only the gui stuff plus minor changes / additions to the original example code. (getting number of files via files.count property for example). So thanx have to go to everyone whose codeparts are in this thingy! :whistle:

commenti

Link to comment
Share on other sites

Nice code for ODBC !

I extended it a bit, to have a basic application for ODBC queries :

#include <GUIConstants.au3>

Dim $result = 0;
Dim $status=" Disconnected "

$gui = GuiCreate("ODBC Query", 704, 488, 490,360 ,BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
; --- Menu for future use ----
$filemenu = GUICtrlCreateMenu ("&File")
$fileitem = GUICtrlCreateMenuitem ("Open",$filemenu)
GUICtrlSetState(-1,$GUI_DEFBUTTON)
$helpmenu = GUICtrlCreateMenu ("?")
$saveitem = GUICtrlCreateMenuitem ("Save",$filemenu)
GUICtrlSetState(-1,$GUI_DISABLE)
$infoitem = GUICtrlCreateMenuitem ("Info",$helpmenu)
$exititem = GUICtrlCreateMenuitem ("Exit",$filemenu)
$recentfilesmenu = GUICtrlCreateMenu ("Recent Files",$filemenu,1)

$separator1 = GUICtrlCreateMenuitem ("",$filemenu,2); create a separator line
$viewmenu = GUICtrlCreateMenu("View",-1,1); is created before "?" menu
$viewstatusitem = GUICtrlCreateMenuitem ("Statusbar",$viewmenu)
GUICtrlSetState(-1,$GUI_CHECKED)
$l_statusbar = GUICtrlCreateLabel ($status,1,450,700,18,BitOr($SS_SIMPLE,$SS_SUNKEN))

$tab=GUICtrlCreateTab (1,1, 700,440)

$tab_conn=GUICtrlCreateTabitem (" Connection ")
;   GUICtrlSetState(-1,$GUI_SHOW)  ; will be display first
    $dsn_list = GUICtrlCreateListView("DSN|Type|Description", 20, 50, 550, 350)
    ODBCsources($dsn_list,"HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources" , "USER"  )
    ODBCsources($dsn_list,"HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources", "SYSTEM")
    $bt_conn   = GUICtrlCreateButton("Connect"   , 600,  70, 70, 20)
    $bt_discon = GUICtrlCreateButton("Disconnect", 600, 110, 70, 20)
    GUICtrlSetState($bt_discon, $GUI_DISABLE )

$tab_query=GUICtrlCreateTabitem (" Query ")
    $ed_qry = GUICtrlCreateEdit("", 20, 50, 550, 350)
    $bt_run = GUICtrlCreateButton("Run"  , 600,  70, 70, 20)
    $bt_clr = GUICtrlCreateButton("Clear", 600, 110, 70, 20)

$tab_result=GUICtrlCreateTabitem (" Result ")
    $result = GUICtrlCreateListView("Result", 20, 50, 550, 350)
    $bt_new = GUICtrlCreateButton("New query"  , 600,  70, 80, 20)
GUICtrlCreateTabitem ("")

GUISetState ()

While 1
    $msg = GUIGetMsg()
    if $msg <> 0 then
        Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
          Case $msg = $fileitem
            $file = FileOpenDialog("Choose file...",@TempDir,"SQLfiles (*.sql)|All (*.*)")
            If @error <> 1 Then GUICtrlCreateMenuitem ($file,$recentfilesmenu)
        Case $msg = $viewstatusitem
            If BitAnd(GUICtrlRead($viewstatusitem),$GUI_CHECKED) = $GUI_CHECKED Then
                GUICtrlSetState($viewstatusitem,$GUI_UNCHECKED)
                GUICtrlSetState($l_statusbar,$GUI_HIDE)
            Else
                GUICtrlSetState($viewstatusitem,$GUI_CHECKED)
                GUICtrlSetState($l_statusbar,$GUI_SHOW)
            EndIf
        Case $msg = $infoitem
            Msgbox(0,"Info","ODBC Query version 0.1")
        Case $msg = $bt_conn
            $dsnarray = StringSplit((GUICtrlRead(GUICtrlRead($dsn_list), 2)), "|")
            if $dsnarray[1] <> "" Then
                $dsn = "DSN=" & $dsnarray [1]
                $adoCon = ObjCreate ("ADODB.Connection")
                $adoCon.Open ($DSN)
                GUICtrlSetState($bt_conn  , $GUI_DISABLE )
                GUICtrlSetState($bt_discon, $GUI_ENABLE  )
                GUICtrlSetData($l_statusbar,"Connected to "&$dsn)
                GUICtrlSetState($tab_query, $GUI_SHOW )     ; show query tab
                GUICtrlSetState($ed_qry, $GUI_FOCUS )       ; select edit field
            Endif
        Case $msg = $bt_discon
            $adoCon.Close
            GUICtrlSetState($bt_conn  , $GUI_ENABLE )
            GUICtrlSetState($bt_discon, $GUI_DISABLE  )
            GUICtrlSetData($l_statusbar,"Disconnected")
        Case $msg = $bt_run
            GUICtrlSetState($tab_result, $GUI_SHOW )        ; show result tab
            GuiSwitch($gui,$tab_result)
            GuiCtrlDelete($result)
            ODBCquery(GUICtrlRead($ed_qry))
            GUICtrlCreateTabItem("")
            GUICtrlSetState($result,$GUI_FOCUS)
            GUISetState (@SW_SHOW,$gui)
        Case $msg = $bt_clr
            GUICtrlSetData($ed_qry, "" )                ; clear data
            GUICtrlSetState($result,$GUI_FOCUS)
        Case $msg = $bt_new
            GUICtrlSetState($tab_query, $GUI_SHOW )     ; show query tab
            GUICtrlSetState($ed_qry, $GUI_FOCUS )       ; select edit field
        Case $msg = $tab_query
            GUICtrlSetState($tab_query, $GUI_SHOW )     ; show query tab
            GUICtrlSetState($ed_qry, $GUI_FOCUS )       ; select edit field
      EndSelect
    EndIf
WEnd
GUIDelete()
Exit

Func ODBCsources($h_controlID, $s_RegEntry, $s_Type)
    Local $s_List, $i_dsncount, $s_VarNm, $s_Value
    $i_dsncount = 1
    $s_VarNm = RegEnumVal($s_RegEntry,  $i_dsncount)
    $s_Value = RegRead($s_RegEntry, $s_Varnm)
    While $s_VarNm <> ""
        $s_VarNm = RegEnumVal($s_RegEntry,  $i_dsncount)
        $s_Value = RegRead($s_RegEntry, $s_Varnm)
        If $s_Varnm <> "" Then
            GUICtrlCreateListViewItem($s_VarNm & "|" & $s_Type & "|" & $s_Value, $h_controlID)
            $i_dsncount += 1
        EndIf
    Wend
EndFunc

Func ODBCquery($s_Qry)
    $adoSQL = $s_Qry
    $adoRs = ObjCreate ("ADODB.Recordset")
    $adoRs.CursorType = 2
    $adoRs.LockType = 3
    $adoRs.Open ($adoSql, $adoCon)
    $cmboVal = ""

    With $adoRs
      $cols=""                              ; Get information about Fields collection
      For $n = 0 To .Fields.Count - 1
         $cols = $cols & .Fields ($n).Name & "|"
      Next
      $result = GUICtrlCreateListView($cols, 20, 50, 550, 350, $LVS_REPORT, $LVS_EX_GRIDLINES)

      If .RecordCount Then
         $count = 0
         While Not .EOF
            $count = $count + 1
            For $colum = 0 To .Fields.Count - 1
               $cmboVal = $cmboVal & "" & .Fields ($colum).Value & "|"
            Next
            $cmboVal = StringTrimRight($cmboVal, 1) & @CR
            GUICtrlCreateListViewItem($cmboVal, $result)
            $cmboVal = ""
            .MoveNext
         WEnd
      EndIf
   EndWith
EndFunc

Any impovements are welcome !

Hans

Link to comment
Share on other sites

Nice code for ODBC !

I extended it a bit, to have a basic application for ODBC queries :

Any impovements are welcome !

Hans

Hans,

Great example!

A possible extension:

to read a list of all the available tables in a Firebird/Interbase SQL-server (Firebird is open source!) just issue the following code:

SELECT
   RDB$RELATION_NAME

FROM
   RDB$RELATIONS

WHERE
   RDB$RELATIONS.RDB$VIEW_SOURCE IS NULL AND
   COALESCE(RDB$SYSTEM_FLAG,0) = 0

To read a list of all the views in a Firebird/Interbase SQL-server just issue the following code:

SELECT
   RDB$RELATION_NAME

FROM
   RDB$RELATIONS

WHERE
   RDB$RELATIONS.RDB$VIEW_SOURCE IS NOT NULL AND
   COALESCE(RDB$SYSTEM_FLAG,0) = 0

You could try creating an extra Tab-control with a list of all tables/views in the selected Data-Source (provided it is an Firebird/Interbase Server)

Link to comment
Share on other sites

A possible extension:

to read a list of all the available tables in a Firebird/Interbase SQL-server (Firebird is open source!) just issue the following code:

You could try creating an extra Tab-control with a list of all tables/views in the selected Data-Source (provided it is an Firebird/Interbase Server)

<{POST_SNAPBACK}>

Tomorrow I will try to make a general ODBC table overview, no idea yet how

and place those in a seperate tabitem. I don't want a database specific solution if possible.

If anybody knowns how to do this ?

Hans

Link to comment
Share on other sites

Tomorrow I will try to make a general ODBC table overview, no idea yet how

and place those in a seperate tabitem. I don't want a database specific solution if possible.

If anybody knowns how to do this ?

Hans

<{POST_SNAPBACK}>

Hans,

Idea: honoring the open-source character of AutoIt I'd favour open-source SQL-servers.

There are not that :whistle: many of them, so you could create a radio-control to choose from several servers. e.g. MySQL, PostgreSQL, Firebird/Interbase, etc.

There must be SQL-gurus out there who can provide the appropriate SQL-query to query the back-end for available tables/views.

According to the choice of server a SQL-statemant is sent tot the back-end querying the tables/views, etc.

Hope this helps,

Arno Rog

Link to comment
Share on other sites

Arno

no problem, I expect to get this working by ODBC, there is something

like a OpenSchema call which retrieves the table information.

Otherwise I will make seperate Database buttons which execute

specific SQL statements for this.

Hans

Link to comment
Share on other sites

Hi Hans!

I saw you made a nicer querytool than my simple one. Good work.

I won´t work more on mine.

Anyway I think I´ll may make a little query tool for Scite as I mentioned above.

I think it is possible to receive the schema so you don´t need to make buttons for different databases. (I won´t do this in my tool, too).

Perhaps DBSCHEMA_CATALOGS/CATALOGS Rowset and as you mentioned OpenSchema may be what we need for this.

commenti

Link to comment
Share on other sites

I think it is possible to receive the schema so you don´t need to make buttons for different databases. (I won´t do this in my tool, too).

Perhaps DBSCHEMA_CATALOGS/CATALOGS Rowset and as you mentioned OpenSchema may be what we need for this.

Yep, I have something working now. By using openschema you get table information

Will post some code tomorrow.

Hans

Link to comment
Share on other sites

Ok, grab the latest version v0.2 here : http://www.autoitscript.com/fileman/users/HansH/ODBCquery.au3

Changes:

- Catalog information: database,tables,columns

When I know how to pass an array to a com object, I will improve it further

- Com object error function

- optional userid, password, database for ODBC connection

- use of accelerator keys

- info box update

- statusbar updates

- copy to clipboard of catalog/query results

Todo:

- figure out passing an array to a com object :whistle:

- code clean up

- improve error handling, now simple msgbox

- catalog improvement

Other suggestions ?

Hans

Link to comment
Share on other sites

Very nice! Just a couple of notes:

1. The listviews on the catalog and result pages are initially okay, but resize oddly when populated on a maximized window, but do resize normally when you change the window size.

2. The right side of the status bar resizes oddly and overlaps the tabview when maximized.

Keep up the great work!

My UDFs: ExitCodes

Link to comment
Share on other sites

Hi,

Looks great!

[i am wanting to read table names at least, and select from SQL database names on my computer]

I have, to my knowledge,

configuration name; HCN Live Data

server name ; HPLAP\HCNSYSTEM

database name; HCN

but none of these work? - should it be some combination of these?

[EDIT - OH, now I see it MQIS?; but gives me an "error" connection; perhaps I need to know the username or something; (I know it does not need a password, though -80020009 error or similar) - still does not give me a choice of databases for SQL query?]

Best, Randall

PS again: I see that the "SQL" server may not even be the one I want, and only finds a remote one;

When I run this on the server, nno "SQL" db shows in the list? - all too hard for a novice?

Edited by randallc
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...