B4J Question Connection error to msqlserver

samperizal

Active Member
Licensed User
Longtime User
Regards.

Can someone help me convert this connection string to a database with a jdbc connection

The connection string is

connectionString = "Data Source = 172.30.1.1 \ POSDB; Initial Catalog = LODYNDEV; User ID = latelefonicaview; Password = XXX; Application Name = GironetCore" providerName = "System.Data.SqlClient

I use this code but it gives the following error:
java.sql.SQLException: Unknown server host name '172.30.1.1 \ POSDB'.


B4X:
Dim msql_T As JdbcSQL
Dim driver As String = "net.sourceforge.jtds.jdbc.Driver"
Dim jdbcUrlT As String = "jdbc: jtds: sqlserver: //172.30.1.1\POSDB / LODYNDEV"



msql_T.InitializeAsync ("msSQLTele", driver, url, TextUsuario.Text.Trim (), TextClave.Text.Trim ())



Thanks in advance.


.
Sorry for my English
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
are you sure this is for b4j? because JdgcSQL is not for b4j but for b4a, anyway:

hi! refer to this small guide on how to connect correctly:

first rule when connecting to sql server, dont use jtds.
 
Upvote 0
Top