BarryW Active Member Licensed User Longtime User Sep 29, 2015 #1 Hi masters. How to connect b4j to a sql server Here is my connection in VB6 "Provider = sqloledb;" & _ "Persist Security Info=False;" & _ "Data Source=192.168.1.244;" & _ "Initial Catalog=nino;" & _ "User ID=developer;" & _ "Password=developer;" Tnx...
Hi masters. How to connect b4j to a sql server Here is my connection in VB6 "Provider = sqloledb;" & _ "Persist Security Info=False;" & _ "Data Source=192.168.1.244;" & _ "Initial Catalog=nino;" & _ "User ID=developer;" & _ "Password=developer;" Tnx...
E Eumel Active Member Licensed User Longtime User Sep 29, 2015 #2 You need the MySQL/J connector. You need to check the jSQL Library In Project Attributes add Code: Copy #AdditionalJar: mysql-connector-java-5.1.29-bin.jar Then you initialize the SQL Object. Code: Copy Private SQL1 as SQL 'in Class Globals or Process Globals SQL1.Initialize2("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/test?characterEncoding=utf8", "username", "passwort") That´s it Upvote 0
You need the MySQL/J connector. You need to check the jSQL Library In Project Attributes add Code: Copy #AdditionalJar: mysql-connector-java-5.1.29-bin.jar Then you initialize the SQL Object. Code: Copy Private SQL1 as SQL 'in Class Globals or Process Globals SQL1.Initialize2("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/test?characterEncoding=utf8", "username", "passwort") That´s it
BarryW Active Member Licensed User Longtime User Sep 29, 2015 #3 Tnx sir. but i need MS SQL SERVER not a MySql... Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 29, 2015 #4 1. You can download this driver: http://jtds.sourceforge.net/ 2. Find the jar file and add it with #AdditionalJar The driver should be: net.sourceforge.jtds.jdbc.Driver The url: jdbc:jtds:sqlserver://<server address>/<database> Upvote 0
1. You can download this driver: http://jtds.sourceforge.net/ 2. Find the jar file and add it with #AdditionalJar The driver should be: net.sourceforge.jtds.jdbc.Driver The url: jdbc:jtds:sqlserver://<server address>/<database>
BarryW Active Member Licensed User Longtime User Oct 3, 2015 #5 Can you post Erel a sample code for that. Tnx Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Oct 4, 2015 #6 All the information is available above. Post the code that is not working for you and we will help you fix it. Make sure to go over the tutorial: https://www.b4x.com/android/forum/threads/sql-tutorial.35185/#content Upvote 0
All the information is available above. Post the code that is not working for you and we will help you fix it. Make sure to go over the tutorial: https://www.b4x.com/android/forum/threads/sql-tutorial.35185/#content
BarryW Active Member Licensed User Longtime User Oct 5, 2015 #7 I already download as driver file. It as .jar file named jtds-1.3.1.jar Now how i will initialize it?. It has a username and password. Tnx Upvote 0
I already download as driver file. It as .jar file named jtds-1.3.1.jar Now how i will initialize it?. It has a username and password. Tnx
BarryW Active Member Licensed User Longtime User Oct 5, 2015 #8 Here is my code JSQL.Initialize("net.sourceforge.jtds.jdbc.Driver", "jdbc:jtds:sqlserver://192.168.1.244/nino/developer/developer") Now here is my error: Program started. Error occurred on line: 13 (main). java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property. at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:654) at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:371) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at anywheresoftware.b4j.objects.SQL.Initialize2(SQL.java:56) at anywheresoftware.b4j.objects.SQL.Initialize(SQL.java:45) at b4j.example.main._appstart(main.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:563) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:221) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:82) at anywheresoftware.b4a.BA.raiseEvent(BA.java:84) at b4j.example.main.main(main.java:29) Caused by: java.io.IOException: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property. at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1963) at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:617) ... 22 more Program terminated (StartMessageLoop was not called). Upvote 0
Here is my code JSQL.Initialize("net.sourceforge.jtds.jdbc.Driver", "jdbc:jtds:sqlserver://192.168.1.244/nino/developer/developer") Now here is my error: Program started. Error occurred on line: 13 (main). java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property. at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:654) at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:371) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at anywheresoftware.b4j.objects.SQL.Initialize2(SQL.java:56) at anywheresoftware.b4j.objects.SQL.Initialize(SQL.java:45) at b4j.example.main._appstart(main.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:563) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:221) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:82) at anywheresoftware.b4a.BA.raiseEvent(BA.java:84) at b4j.example.main.main(main.java:29) Caused by: java.io.IOException: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property. at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1963) at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:617) ... 22 more Program terminated (StartMessageLoop was not called).
Erel B4X founder Staff member Licensed User Longtime User Oct 6, 2015 #9 Try to add the user name and password to the url: http://stackoverflow.com/questions/...tion-i-o-error-sso-failed-native-sspi-library Upvote 0
Try to add the user name and password to the url: http://stackoverflow.com/questions/...tion-i-o-error-sso-failed-native-sspi-library