Jump to content

bartekd

Active Members
  • Posts

    156
  • Joined

  • Last visited

Everything posted by bartekd

  1. i guess $var is the array right? If so, I receive the following error: (1434) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $Info = $aData[0][1] $Info = ^ ERROR (I changed $var to $adata, as that is what my array is)
  2. I looked all over the forum, and can't find this anywhere. I am sure that there is a easy way to do this, but I can't find an answer. OK so I am using ChrisL's _sql files. I have created a pretty extensive GUI that I have with a bunch of queries that I use all the time (All Select queries on Win 2000 sql server). Anyways, this is what I am trying to accomplish. This is what is in the array if I run a query, and I want to be able to get the data out of an array, and be able to work with the part that says 'Test123' and put that alone into clipboard (clipput). Is there an easy way to do this? [0]|sqldb [1]|Test123 I know it is a 2D array. I have tried different functions that work with arrays, but most do not work with 2D arrays.
  3. Can someone post a link to the EXE for the new version (3.0) It is not working for me. Looks like media fire removed the link
  4. Nice, thanks allot Chris. This works like a charm. Hey one thing, are you from peterborough ontario canada? If so thats weird because that is where I grew up.
  5. Thanks for the suggestion, but that doesn't seem to work. Can anyone else think of something?
  6. Hello all, I have been using Autoit for a couple years, and over time have been learning as I go. Recently I have expanded into using SQL. At my work we have a million little queries that we use all the time. We use SQL 2000, so I found the _sql.au3 which has done wonders. I have all my queries running nicely. However there is one issue that I have not been able to see the solution for even as I have searched the forum allot for. When I run a select statement, and there are no results, it doesn't display anything, but if there is results, it displays it in 2d array. Is there a piece of code that I can add that if there are no results it will display a msg box or something. Here is some of my code. Let me know if I can provide any other information. #include <array.au3> #include <_sql.au3> _SQLRegisterErrorHandler();register the error handler to prevent hard crash on COM error $listname = 'TDCS08' $con = _SQLStartup() If @error then Msgbox(0,"Error","Error starting ADODB.Connection") _SQLConnect(-1,"toronto4","gcti_500",'Username','password') if @Error then Msgbox(0,"",$SQLErr) $Query = "select top 20 * from " & $ListName $data = _SQLExecute(-1,$Query) If Not @error then $aData = _SQLGetData2D($data) _arrayDisplay($aData) Else Msgbox(0,"",$SQLErr) EndIf _SQLClose()
×
×
  • Create New...