-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By 3Jake
Hello Smart People!
I have a multi-column .CSV that I would like to draw information from, in order to populate (send) that info to some fields in an Oracle form. This would be for account-creation in Oracle.
I have the basic script to navigate (tab) through the fields in the Oracle form, but I am SUPER-new to AutoIT and don’t quite see how to get the script to import and use variables from a .CSV
For example:
My script just waits for the page to be active, then enters data and tabs between fields like this:
; Wait for the window to be active WinWaitActive("Oracle is Cool - E-Business is the Best") ; User Name Send("jsmith") Send("{TAB}") ; Password Send("Password1") Send("{TAB}") Send("Password1") Send("{TAB}") ; Description Send("John Smith") Send("{TAB}") (etc. etc. etc.…)
The winning solution would take one row at a time, feed it into fields on the Oracle form, save, and then start in on the next row
It looks like I’d need a combination of “FileReadToArray” ( or“FileReadLine”?) and “StringSplit” to loop through the values and set them to variables, which would then replace my current "hard-coded" values to be typed them into the form?
I found the following example in the “Help” snippets for stringsplit()… this seems like it’s in the ballpark but I’m having some trouble wrapping this around what I’ve put together, since each entry in the array would have multiple elements per line instead of just “Day”:
Func Example() Local $aDays = StringSplit("Mon,Tues,Wed,Thur,Fri,Sat,Sun", ",") ;Split the string of days using the delimiter "," and the default flag value. #cs The array returned will contain the following values: $aDays[1] = "Mon" $aDays[2] = "Tues" $aDays[3] = "Wed" ... $aDays[7] = "Sun" #ce For $i = 1 To $aDays[0] ; Loop through the array returned by StringSplit to display the individual values. MsgBox($MB_SYSTEMMODAL, "", "$aDays[" & $i & "] - " & $aDays[$i]) Next EndFunc ;==>Example
This post also seems like a similar example, but I don’t need it to be so selective RE: one specific column:
https://www.autoitscript.com/forum/topic/166261-how-to-read-csv-specific-row-and-columns
Any advice would be appreciated! Thanks for taking a minute to look!
-
By hugomito
Hi all,
I hope you can help me with this. I need to connect to a Database using Cloudera ODBC Driver for Impala. I installed the driver, created a User DSN (drona2) and tested it successfully (got the message: Successfully connected to data source!) but when I try to connect to the database using a Conneciton String, it simply didn't work.
I tried connecting to the database using the User DSN, I previously created, that has all parameters needed but got the following error:
$ProviderDatasource = 'DSN=drona2;'
$conn_Database = ObjCreate ("ADODB.Connection")
$conn_Database.ConnectionString = $ProviderDatasource
$conn_Database.Open
==> The requested action with this object has failed.:
$conn_Database.Open
$conn_Database.Open^ ERROR
Also I tried adding all parameters to my connection string as follows but also got the same error:
$ProviderDatasource = 'Driver=Cloudera ODBC Driver for Impala;Host=MyHost.domain.com;PORT=21050;AuthMech=3;UID=MyUserId@domain.com;PWD=MyPasswordc;Schema=default;SSL=1;AllowSelfSignedCerts=1;AllowHostNameCNMismatch=1;CheckCertRevocation=1;KrbFQDN=_HOTS;KrbServiceName=impala;ServicePrincipalCanonicalization=1'
I hope someone has used this driver successfully before and can shed some light here.
If you need additional information, let me know.
Regards,
-
By Skysnake
Question
How to detect / determine if requested ODBC driver is not available? Not installed? Is there a specific function / error code to check for?
I asked this on the ADO.UDF support page, but I think the issue is not limited to that UDF. What test can be run to determine if the requested ODBC data driver is available?
Skysnake
-
By cookiemonster
Hi,
Im about to start making an autoit script that will read the current ODBC settings, have a drop down to select a different one which would then update the ODBC in windows to use the new settings.
Can anyone point me in the direction of how to read the ODBC 32 bit settings? are they in the registry?
-
By GarnetDagger
I would love to have some help or guidance
I am able to Query from my database but I am not able to Update or insert etc because I lack the knowledge for it
this is my code for to retrieve some data from and works perfect
Dim $ueberschriften = "" Dim $anzahl = 0 Dim $dsncount = 1 Global $DSN = "MTXXV5" Global $Query = "Select * from VIEWS" Func SSSQL($SSQuery) ;SuperSonicSQL ConsoleWrite($SSQuery & @LF) $cmboVal = "" $adoCon = ObjCreate("ADODB.Connection") $adoCon.Open($DSN) $adoRs = ObjCreate("ADODB.Recordset") $adoSQL = $SSQuery $adoRs.CursorType = 2 $adoRs.LockType = 3 $adoRs.Open($adoSQL, $adoCon) With $adoRs Global $QueryAnswer = .GetRows EndWith Return $QueryAnswer EndFunc ;==>SSSQL and this is my failed attempt, The Query is correct but I want to able to use it in autoit instead of have to manual update or insert into flamerobin
$SS_SQL_Insert_or_Update = "INSERT INTO DETECTION (DNAME,DTYPE,WINNAME,AREA,COLOR,MOUSE) VALUES ('PopUpTradeInviteYes s ','SEARCH','XXX','175,240,550,240,65,228,82,234','5062478','0') " Func SSSQLIU($SS_SQL_Insert_or_Update) ;SuperSonicSQL :P $cmboVal = "" $adoCon = ObjCreate("ADODB.Connection") $adoCon.Open($DSN) $adoRs = ObjCreate("ADODB.Record") $adoSQL =$SS_SQL_Insert_or_Update ;~ $adoRs.CursorType = 2 $adoRs.LockType = 4 $adoRs.Open($adoSQL, $adoCon) ;~ With $adoRs ;~ Global $QueryAnswer = .GetRows ;~ EndWith ;~ Return $QueryAnswer EndFunc ;==>SSSQL I am at a total loss and I am just trying this at random but I am also going to sleep now
I would love to have some minor examples
"C:\_CC_V10_DetectionTAB.au3" (174) : ==> The requested action with this object has failed.:
$adoRs.Open($adoSQL, $adoCon)
$adoRs^ ERROR
-