PowerBuilder Connect SQL Anywhere Using ODBC
Step 1: you need to get driver of SQL Anywhere including dbeng9.exe, dbodbc9.dll if you use SQL Anywhere server dbsrv9.exe. Here I use SQL Anywhere version 9. for other versions it is almost the same as you find the appropriate driver for each version
Step 2: Registry Regedit With Run file .Reg or PowerBuilder Function RegistrySet()
Step 3: Test Connect
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
String ls_database, ls_user, ls_pass, ls_databasefile ls_user = "dba" ls_pass = "sql" ls_databasefile = "peat.db" ls_database = "peat" RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\" + ls_database,"AutoStop",RegString!,"yes") RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\" + ls_database,"DatabaseFile",RegString!, ls_databasefile) RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\" + ls_database,"DatabaseName",RegString!,ls_database) RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\" + ls_database,"Driver",RegString!,"dbodbc9.dll") RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\" + ls_database,"Start",RegString!,"dbeng9") RegistrySet("HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\ODBC DATA SOURCES", ls_database , RegString!, "SQL Anywhere 9") Transaction ltran_conn ltran_conn = Create Transaction // Using ODBC Connect To SQL Anywhere ltran_conn.DBMS = "ODBC" ltran_conn.AutoCommit = False ltran_conn.DBParm = "ConnectString='DSN="+ls_database+";UID="+ls_user+";PWD="+ls_pass+"'" Connect Using ltran_conn ; If ltran_conn.SQLCode = -1 Then MessageBox('Warning','Connect Database Error' + ltran_conn.SQLErrText) Else MessageBox('Warning',"Connect Success!") End If Disconnect Using ltran_conn ; |
Find Projects On Github click here
Good Luck!
Hello
Reference SMTP Email Sending
As we know, to send emails from our applications, both Gmail and Outlook must be configured to allow less secure applications.
Google already announced that this will be discontinued at the end of May.
Is there any Free component that allows sending with authentication?
Or how else can we send and receive emails from PowerBuilder
Thank you very much !!