Android Question Adding Library and referencing to it.

Backalife

Member
Gents, sorry if I am getting confused about such an elementary thing,
I am trying to reproduce the JDBC project Here with SQL Server instead of MySQL so I proceeded by:
1- Setting the Additional Libraries folder see Attachment "AdditionalLibs"
2 - Dropped the JDBC Library downloaded from Here onto the Additional Libraries Folder: Attachment "JDBC_Jar_Added"
3 - Importing the library using #AdditionalJar "mssql-jdbc-8.2.2.jre11"

But I am still getting an error about missing library to the jdbcSQL variable declared in the code.

Thank you.
 

Attachments

  • AdditionalLibs.png
    25.4 KB · Views: 234
  • JDBC_Jar_Added.png
    17.7 KB · Views: 238

Backalife

Member
Thank you Erel for your help,
These are the Globals and Attribs statments, I hope I am not missing something up:
in fact I tried to make it work with both mssql-jdbc-8.2.2.jre11 and mssql-jdbc-7.2.2.jre11 but in vain.

Jdbc object not recognized:
#Region  Project Attributes
    #ApplicationLabel: SQL Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
'    #AdditionalJar: mssql-jdbc-8.2.2.jre11
    #AdditionalJar: mssql-jdbc-7.2.2.jre11
  
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
    #BridgeLogger: True
    DriverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
#End Region

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

  
End Sub

Sub Process_Globals
   Public sqlserver As JdbcSQL
   Private driver As String = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
   Private jdbcUrl As String = "jdbc:sqlserver://172.23.26.81:1433"
   Private Username As String = "user"
   Private Password As String = "password"
End Sub

and this is the Log:
Thanks again.
 
Last edited:
Upvote 0

Backalife

Member
Negative Erel, my Libraries Manager shows no JdbcSQL item.
Here is a snapshot of it.
 

Attachments

  • LibTab.png
    27.1 KB · Views: 219
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Erel point to link at post 6 and follow the link we can read:
The SQL type was renamed to JdbcSQL and ResultSet was renamed to JdbcResultSet, this allows using it together with the SQL library.

Contracts has always imported things in small letters. This post has a picture very small overview of all used and unused libraries. So what do we see if we blow up the small picture at post 5:

No SQL library selected. So perhaps it helps to select also the SQL library?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…