Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
From the looks of it , the program fails to connect and this results in the connection variable being passed a null value, which then causes a NullpointerException to be thrown. I am not familiar with .NET but it seems likely that the log-in code needs to be edited to work on Linux.
Well, at least you narrowed it down to something that is actionable. Good luck!
So is this something i'd need a programmer to fix by changing the program code up a bit?
When you first got the program, were there setup instructions that told you how to set it up to connect to a DB server? If so, review them or check with the people who sold it to you.
The program was created in house, but developement has finished. The original programmer and I keep in touch from time to time. So I could check with him, but he is not a linux ace, so i'm not sure what i'd ask him.
The encrypted config.ini file has all the db connection info, including the password (hence, why it's encrypted).
I know that using mono, the config.ini file is being read, cause when i change the info in the file, i get different errors.
Below is the connection info i use in it's unencrypted form, and without the actual user/pass info:
What's with the backslash in Fileserver\OURDB? Is this something that he is parsing out? If not, then it's not likely that Linux is going to look too kindly on it. Linux sees a backslash as indicating a special character, not as a directory or other type of separator.
Did you use that C# connector with the data you put into this .ini file, and does it make the connection OK?
I'd go ahead and check with your guy. He may surprise you with his Linux knowledge.
OK, yes, there is a spot in the admin area of the program where you can encrypt or decrypt the settings that will go in the config.ini file.
The Fileserver is the name of the server, and I believe OURDB is the name of the sql instance. Caffeine is the name of the database in the OURDB instance. I'm not exactly sure how it works, but i think it's so that you can install different programs and they each run their own instance of the sql server. For example, we installed some WASP barcode software to keep track of inventory, and it too has it's own "instance" and it's own db.
When i used the command line stuff in linux to connect to the sql server caffeine, i just told it that the server is fileserver and the db is caffeine. I tried that in my config file but it didn't work.
Also, what do you mean by the C# connector? I'm guessing i didn't use it since i don't know what that is. Is that the command i was able to enter to get into the db from the command line?
Oh, and I checked with my guy...he was not too sure how to proceed. He didn't think it could work at all, that is until i told him about mono and wine.
my /etc/freetds/tds.dsn.template file looks like this:
[DSN_NAME]
Description = Caffeine Connection.
Driver = TDS
Trace = No
Database = Caffeine
Server = fileserver
Port = 1137
--Thanks
Yeah, that's the ODBC that I was trying to remember from my MS days.
The C# tester I was talking about is here: http://linux.die.net/man/1/sqlsharp I think it uses the same connection objects your program does, so it should check through the same path that your program uses and verify the object can open the database.
SQL# \Provider SqlClient
The default Provider is SQLCLIENT
SQL# \Open
Opening connection...
Exception Caught Opening. Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
This page: http://www.mono-project.com/SQLClient did give me some good info. The whole issue seems to be the port, which i now include in my config.ini file on the linux system. It now reads:
You might want to ask your guy on this one. It sounds like there might be some sort of mismatch between what the DB descriptor is in some column and what's wanted, but there's no way to tell whether this is userid/password related or something after the login is accepted.
try to google it..
"Run ASP and .NET in UBUNTU and Debian LINUX" and pick GoItExpert result
u may still need to run the ms sql on dedicated server or a shared server but that's it..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.