Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Sybase Adaptive Server Anywhere 8 remote connection
FidoNZ
#1 Posted : Thursday, March 19, 2009 4:46:39 PM(UTC)
Groups: Member
Joined: 12/8/2008(UTC)
Posts: 6
Location: New Zealand

Hello,

I am having problems connecting to my sql database via my asp.net application.

This is the error message I am getting: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)"

Unfortunately working with databases through ASP.NET is fairly new to me, however I did find a guide to setting up the connection correctly.

However, if you follow the above link you see that the guide refers to IIS. I am using UltiDev's Cassini because I have XP home and so do not have IIS. Is there an alternative way to set this up with Cassini? Failing that any advice on another way to connect to my database would be greatly appreciated.

I am using;
Sybase Adaptive Server Anywhere 8.
VB.NET as my programming language.

Here is my connection string: conn = "Data Source='localhost:xxxx/db/';Database=myDB.db;Uid=userID;Pwd=userPwd;Network=DBMSSOCN;"
I am using the System.Data.SqlClient class to try to connect.

Thank you!
Ultidev Team
#2 Posted : Friday, March 20, 2009 7:06:27 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

There are several points we'd like to mention:
- Using System.Data.SqlClient probably will not work because System.Data.SqlClient is made exclusively for Microsoft SQL Server, not for Sybase.
- Following the guide you provided a link to may be a bit confusing because it's way too old - the document is made 6 yeas ago and applies to ASP.NET 1.0. These days you don't specify connection strings in the AppSettings section of application. app.config and web.config files now have connectionStrings section in them.
- We would recommend to google for a VB.NET+Sybase sample walk-through, preferably for WinForms app so there would be no confusing places about doing anything with IIS, and use the sample to learn how to connect to the Sybase DB. After that create your own simple VB.NET Windows app that works with your database to be sure you got the connection string right, and then simply move the connection string to the web.config file of your ASP.NET app.

Please also consider using later version of Sybase - version 10 seems to have better facilities for Visual Studio built in.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
FidoNZ
#3 Posted : Friday, March 20, 2009 2:36:41 PM(UTC)
Groups: Member
Joined: 12/8/2008(UTC)
Posts: 6
Location: New Zealand

Hello,

Many thanks for the suggestions. I'll investigate further.


Fido.
Ultidev Team
#4 Posted : Friday, March 20, 2009 2:43:19 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Not a problem!

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
FidoNZ
#5 Posted : Sunday, March 22, 2009 10:14:51 PM(UTC)
Groups: Member
Joined: 12/8/2008(UTC)
Posts: 6
Location: New Zealand

Hello, me again!

I finally managed to get some data out of my database and display it on my web page. Your guidance helped get me on the right track so thank you!

What really didn't help was a bug with the Sybase driver, but I found some bug fixes over on the Sybase website. (Has to be about the worst website I ever had to navigate!) Its reassuring to know that most of the problem wasn't my programming but was in fact the substandard software I had been sold. When did it become OK to box up and sell something that doesn't work as advertised?

I almost gave up with Sybase, I took a look at Microsoft's SQL server 2008 I even began to download it. But they wouldn't let me chose the download destination on my hard drive and you can bet they wouldn't be letting me chose the installation location either, so I changed my mind about that and went back to the Sybase thing.

Thanks for your help again!
Ultidev Team
#6 Posted : Monday, March 23, 2009 5:03:23 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Not a problem! We're always happy to help.

As for the MS SQL Server, it's a very solid product, and it's very well integrated with Visual Studio and .NET applications. If you forgave them some inflexibility as to where it gets installed, you probably will have pretty good run with SQL Server.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (4)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.