LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-13-2008, 12:39 PM   #31
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141

Quote:
Originally Posted by jay73 View Post
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!
 
Old 10-13-2008, 12:55 PM   #32
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
So is this something i'd need a programmer to fix by changing the program code up a bit?
 
Old 10-13-2008, 01:03 PM   #33
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by xmrkite View Post
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.
 
Old 10-13-2008, 08:01 PM   #34
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
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:

Quote:
packet size=4096;user id=userid;password=abc123;data source=Fileserver\OURDB;persist security info=False;initial catalog=CAFFEINE
This works great in Windows.

-Any Ideas?
-Thank you
 
Old 10-13-2008, 08:25 PM   #35
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by xmrkite View Post
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.
Does this mean that you have some program or some feature in this program that can change the contents of the .ini file?


Quote:
Below is the connection info i use in it's unencrypted form, and without the actual user/pass info:
Quote:
packet size=4096;user id=userid;password=abc123;data source=Fileserver\OURDB;persist security info=False;initial catalog=CAFFEINE
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.
 
Old 10-14-2008, 10:59 AM   #36
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
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.

-Thanks
 
Old 10-14-2008, 11:22 AM   #37
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
Also, here is where i found info on how to connect via command line:

http://wiki.debian.org/Manual-Howto#...b29ae62f3c78b1

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
 
Old 10-14-2008, 01:42 PM   #38
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by xmrkite View Post
Also, here is where i found info on how to connect via command line:

http://wiki.debian.org/Manual-Howto#...b29ae62f3c78b1

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.
 
Old 10-14-2008, 02:03 PM   #39
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
OK, here's what i got:


Quote:
SQL# \ConnectionString Server=fileserver;Database=caffeine;User ID=xxxx;Password=xxxx

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.
Here's another way i tried it:

Quote:
SQL# \ConnectionString Server=fileserver\Priority;Database=Caffeine;User ID=xxxx;Password=xxxx

SQL# \Open
Opening connection...
Exception Caught Opening. SQL Server does not exist or access denied.


Could this issue be because the port we're using is not the default sql port? We're using port 1137 to connect to the DB.

Last edited by xmrkite; 10-14-2008 at 02:05 PM.
 
Old 10-14-2008, 02:38 PM   #40
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
I looked through the available documentation and I see nothing for setting the port. But, what the hey? Try the following anyway:

Quote:
SQL# \ConnectionString Server=fileserver;Database=caffeine;User ID=xxxx;Password=xxxx;Port=1137
 
Old 10-14-2008, 03:36 PM   #41
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
Good idea, but here's what i got:

Unhandled Exception: System.ArgumentException: Keyword not supported :PORT
at System.Data.SqlClient.SqlConnection.SetProperties (System.String name, System.String value) [0x00000]
at System.Data.SqlClient.SqlConnection.SetConnectionString (System.String connectionString) [0x00000]
at System.Data.SqlClient.SqlConnection.set_ConnectionString (System.String value) [0x00000]
at Mono.Data.SqlSharp.SqlSharpCli.OpenDataSource () [0x00000]
at Mono.Data.SqlSharp.SqlSharpCli.HandleCommand (System.String entry) [0x00000]
at Mono.Data.SqlSharp.SqlSharpCli.Run (System.String[] args) [0x00000]
at Mono.Data.SqlSharp.SqlSharpDriver.Main (System.String[] args) [0x00000]
 
Old 10-14-2008, 03:44 PM   #42
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Well, you may be screwed. Can you bring up a sample database on the standard port and see if it will connect?
 
Old 10-14-2008, 03:51 PM   #43
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
OK, we're making some progress....

I managed to get sqlsharp into the db by setting the proper port by doing this:

Quote:
\ConnectionString Server=fileserver,1137;Database=Caffeine;User ID=xxxx;Password=xxxx
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:

Quote:
Server=fileserver,1137;Database=Caffeine;User ID=xxxx;Password=xxxx

And now the program opens.
There is a user and password login when you open the program, and that part now is not working.

The error it gives is:

Quote:
Error: system.argumentexception: the parameter data type of OleDbType is invalid




--Any ideas?
-Thanks

Last edited by xmrkite; 10-14-2008 at 03:52 PM.
 
Old 10-14-2008, 04:07 PM   #44
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
Old 02-14-2010, 07:55 AM   #45
tom1111
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
Cool it is possible .net code on ubuntu

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..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect to MS SQL Server from linux C++ ? skosanba Linux - Software 0 08-14-2006 08:05 AM
Connect to ms sql server from linux RH saustin99 Linux - Newbie 1 02-17-2006 05:07 PM
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
setting up sql server on linux machine feetyouwell Linux - General 4 12-12-2004 10:58 AM
Will MS SQL run on a Linux box? cvonhelf Linux - Newbie 2 10-20-2003 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration