Jump to content

Recommended Posts

Posted

Hi all,

I'm new to autoit, but thanks to many reading hours of the forum Q&A and the help files i'v managed to get a script up and running.

My script opens a Gui that asks the user for his username.

I want to make a veification function that will connect to my sql database that is hosted online (bluehost) and verifies that the username is registered.

I have the database up, and I don't need the script to insert new members, only to read from the Username table and match it to the input the user entered. If he is a registerd user, the script will go on, else, msgbox...

Can someone please give me a hint on how to start... I know very little about SQL.

Posted

There is a using ODBC and another without ODBC available.

This should give you some functions to start with.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Thank you!

I'll give these UTF a try.

One small question,

How do I know if I need the one with or without ODBC. How can I check it on my server?

Posted

When using the ODBC version you have to define a DSN (run ODBCAD32 for setup). The second UDF seems to use a DLL.

I haven't tried any of this UDFs. Just take a look at the functions and pick the UDF that offers what you need.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

I'm stuck...

Did so much work and spent so many hours and I just can't figure out that last connection.

These UDF's are too complicated, I don't need to insert or write into the tables, only to read in one table if the user is there or not..

so I will need to connect to my DB, check if user is there and proceed.

maybe I don't really know ow to use a UDF...

Posted (edited)

It's not too complicated nor complex.

Include th UDF into your script using the #include directive.

Use the function to connect to the MySQL database.

Create the SQL query statement using the username. Something like: "Select * from usertable where username = '" & $sUser &"'"

Execute the sql query using one of the UDFs functions.

Check the result.

Done.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

OK,

Now the last answer you gave me there really organized things for me and I'm pretty sure I'm on the track.

I started using a UDF called EZMySQL, it was a link from one of the UDFs you pointed out for me.

so I have the line in the UDF:

_EzMySql_Open($Host, $User, $Pass, $Database = "", $Port = 0, $unix_socket = "", $Client_Flag = 0)

I know these parameters: $User, $Pass, $Database

But the rest I don't know where to find them: $Host, $Port, $unix_socket, $Client_Flag

This is what he wrote in the UDF:

$Host - hostname or an IP address ;(my host is bluehost.com.. but thats not what I write, right?)

$Port - If port is not 0, the value is used as the port number for the TCP/IP connection

$unix_socket - specifies the socket or named pipe that should be used. (no pipe: "" (empty string))

$Client_Flag - flags to enable features

sorry if my questions are obvious and a bit stupid..

Thanks for your patience and support!!!1

Posted

Parameters $Port, $unix_socket and $Client_Flag are optional. If you don't need to set them, ignore them.

$Host - hostname or an IP address ;(my host is bluehost.com.. but thats not what I write, right?)

When you've set up the MySQL at bluehost you will have been given information how to access it. That should include the hostname/IP address, port number ...

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Shlasi,

the Example Forum is for disussing the functionality of an example script or UDF.

I would discuss obvious coding problems here.

Can you post the code you use?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

My host support say that in order to access my DB from remote connection I need to whitelist the ip adress. (it seems that I'll be needing to whitelist every users IP??!!)

So, I'mm thinking of a different approach,

It's not a problem to have my user list on a table in a webpage (the table will come from the DB..)

But, is there a chance I can access that page with my script without actually openning the webbrowser?

I only need to read from it not to insert data..

Posted

My host support say that in order to access my DB from remote connection I need to whitelist the ip adress. (it seems that I'll be needing to whitelist every users IP??!!)

No, You only need to whitelist on your firewall every outgoing connection (IP-address) of bluehost.com where you want to connect to.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
  • Recently Browsing   0 members

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