Questions regarding MSSQL with JDBC Library

TonyTango

Member
Licensed User
Longtime User
Folks

With respect to the MSSQL library I have the following questions:

How can I specify a port different than the default 1433?

How do I see any error messages generated by the MSSQL/JTDS library? I put in deliberately incorrect IP address for a non existent machine and the code just keeps on going past the db.setDatabase and the db.Query lines.

I've asked the questions at the bottom of the six page thread but there hasn't been an answer there so I figured I'd start fresh.

Thanks, Tony
 

TonyTango

Member
Licensed User
Longtime User
No, this is for an internal to a local network only app. There is no need to go to the extra work of adding an ASP.Net layer. I also require the ability to open files from a file server from the Android app.

This is for folks who are walking around on a shop floor with a tablet and need to look at various PDF drawing files. The drawing files are referenced via a SQL Server database. That is the drawings have a real long 20 to 30 character name but internal to the client they only have a three or four digit number for the drawing. So they are looking at the SQL Server data first and then deciding they need to view the drawing.
 
Last edited:
Upvote 0

TonyTango

Member
Licensed User
Longtime User
Why do I need more control over the connection? The users are logged into the local network, etc, etc to access the database and file servers anyhow.

To me this is several additional layers, one being the IIS/ASP.Net server and the other layer being the coding I would have to do. And additional points of failure.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
As I said both approaches are reasonable. Consider for example what happens when the database password changes for some reason. You will need to update your app on all the devices.

I'm also not familiar with the MSSQL library implementation. The ASP .Net solution together with HttpUtils (or preferably HttpUtils2) are well tested and reliable.
 
Upvote 0

TonyTango

Member
Licensed User
Longtime User
As I said both approaches are reasonable. Consider for example what happens when the database password changes for some reason. You will need to update your app on all the devices.

I'm also not familiar with the MSSQL library implementation. The ASP .Net solution together with HttpUtils (or preferably HttpUtils2) are well tested and reliable.
I took a look at a thread on this forum and it's a lot simpler than I thought so I'll investigate that approach in more detail. Looks like you just pass the ASP page, code supplied, a query and get data back. That works for me.

Most especially given that there is no error handling in the supplied MSSQL JAR file. I should at least get some kind of meaningful errors back if I put in the wrong IP address.
 
Upvote 0

hf

Member
Licensed User
use
query("insert into talbe(field) values(value);select 'ok'")
query("exec store procedure ;select 'ok'")
such as...
 
Upvote 0
Top