Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

IQ Connection String Syntax???

11 posts in General Discussion Last posting was on 2011-05-27 03:29:51.0Z
Aaron G Posted on 2011-05-07 23:45:34.0Z
Sender: 6bab.4dc5d147.1804289383@sybase.com
From: Aaron G
Newsgroups: sybase.public.iq
Subject: IQ Connection String Syntax???
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4dc5d99e.6cd4.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 May 2011 16:45:34 -0700
X-Trace: forums-1-dub 1304811934 10.22.241.41 (7 May 2011 16:45:34 -0700)
X-Original-Trace: 7 May 2011 16:45:34 -0700, 10.22.241.41
Lines: 42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4356
Article PK: 246495

I am writing a .NET application within Visual Studio 2010
and I am trying to use the iAnywhere.Data.SQLAnywhere .NET
data provider to connect to a Sybase IQ database.
Basically, I am having trouble getting the correct
ConnectionString syntax. Part of my trouble is that I am
trying to connect to the DB utilizing only the IP Address,
DB Name, and Port (No ServerName). No matter how I
structure the ConnectionString, it gives me an error stating
that I must include the ServerName. However, when I add the
server name it tells me that my ConnectionString has invalid
syntax.

What is the correct ConnectionString syntax to connect to a
Sybase IQ database utilizing the iAnywhere.Data.SQLAnywhere
NET data provider with only the IP Address, DB Name, and
Port? I have done some serious digging into the Sybase
Books Online and have tried just about every iteration of
ConnectionString that I can think of and I cannot get it to
work.

When using this syntax it tells me that I “must include
the ServerName”:

"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT;
Host=127.0.0.1;PORT=2640)"

However when I add the server name as such:

"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT;
Host=127.0.0.1;PORT=2640);ServerName=MyServer"

I get an error telling me that my “ConnectionString has
invalid syntax”.

I would like to be able to connect without the ServerName!
I have already modified my application to utilize an ODBC
connection but I would rather use the native .NET data
provider if possible so that my end users will not have to
install a stand-alone Sybase client to be able to connect to
the DB.

Thanks in advance!


Rob V [ Sybase ] Posted on 2011-05-08 08:50:14.0Z
From: "Rob V [ Sybase ]" <robv@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: robv@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV / TeamSybase / Sybase
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10
MIME-Version: 1.0
Newsgroups: sybase.public.iq
Subject: Re: IQ Connection String Syntax???
References: <4dc5d99e.6cd4.1681692777@sybase.com>
In-Reply-To: <4dc5d99e.6cd4.1681692777@sybase.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4dc65946$1@forums-1-dub>
Date: 8 May 2011 01:50:14 -0700
X-Trace: forums-1-dub 1304844614 10.22.241.152 (8 May 2011 01:50:14 -0700)
X-Original-Trace: 8 May 2011 01:50:14 -0700, vip152.sybase.com
Lines: 66
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4357
Article PK: 246497


On 08-May-2011 01:45, Aaron G wrote:
> I am writing a .NET application within Visual Studio 2010
> and I am trying to use the iAnywhere.Data.SQLAnywhere .NET
> data provider to connect to a Sybase IQ database.
> Basically, I am having trouble getting the correct
> ConnectionString syntax. Part of my trouble is that I am
> trying to connect to the DB utilizing only the IP Address,
> DB Name, and Port (No ServerName). No matter how I
> structure the ConnectionString, it gives me an error stating
> that I must include the ServerName. However, when I add the
> server name it tells me that my ConnectionString has invalid
> syntax.
>
> What is the correct ConnectionString syntax to connect to a
> Sybase IQ database utilizing the iAnywhere.Data.SQLAnywhere
> NET data provider with only the IP Address, DB Name, and
> Port? I have done some serious digging into the Sybase
> Books Online and have tried just about every iteration of
> ConnectionString that I can think of and I cannot get it to
> work.
>
> When using this syntax it tells me that I “must include
> the ServerName”:
>
> "UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT;
> Host=127.0.0.1;PORT=2640)"
>
> However when I add the server name as such:
>
> "UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT;
> Host=127.0.0.1;PORT=2640);ServerName=MyServer"
>
> I get an error telling me that my “ConnectionString has
> invalid syntax”.
>
> I would like to be able to connect without the ServerName!
> I have already modified my application to utilize an ODBC
> connection but I would rather use the native .NET data
> provider if possible so that my end users will not have to
> install a stand-alone Sybase client to be able to connect to
> the DB.
>
> Thanks in advance!

Try using "ENG=" instead of "Servername=".
Also, it could just be that your actual servername is "MyDB" rather than
"MyServer".

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


Trevor Moroe Posted on 2011-05-09 10:36:42.0Z
Sender: 4701.4dc7c1ef.1804289383@sybase.com
From: Trevor Moroe
Newsgroups: sybase.public.iq
Subject: Re: IQ Connection String Syntax???
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4dc7c3ba.472b.1681692777@sybase.com>
References: <4dc65946$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 9 May 2011 03:36:42 -0700
X-Trace: forums-1-dub 1304937402 10.22.241.41 (9 May 2011 03:36:42 -0700)
X-Original-Trace: 9 May 2011 03:36:42 -0700, 10.22.241.41
Lines: 99
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4358
Article PK: 246498

I agree with Rob, but I prefer OLEDB

example:-
Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
Security=false;LINKS=tcpip(host=MY_HOST;port=1234)

On thing to be aware of this that .NET uses connection
pooling and even if you close and dispose a connection
object the connection will STILL remain on the database for
about 60 seconds. This is fine if you are connecting via
middleware server but if you are writng a client/server
application then consider also adding the folloiwng
attribute to your connection string to turn pooling off:-

OLE DB Services=-2

The reason you will want it off is that if you use global
temps then they will retain the data from the previous
command, or you may have hundreds of connections held open
doing nothing. The choice is application specific but it is
something to be aware of.

Trev

> On 08-May-2011 01:45, Aaron G wrote:
> > I am writing a .NET application within Visual Studio
> > 2010 and I am trying to use the
> > iAnywhere.Data.SQLAnywhere .NET data provider to connect
> > to a Sybase IQ database. Basically, I am having trouble
> > getting the correct ConnectionString syntax. Part of my
> > trouble is that I am trying to connect to the DB
> > utilizing only the IP Address, DB Name, and Port (No
> > ServerName). No matter how I structure the
> > ConnectionString, it gives me an error stating that I
> > must include the ServerName. However, when I add the
> server name it tells me that my ConnectionString has
> > invalid syntax.
> >
> > What is the correct ConnectionString syntax to connect
> > to a Sybase IQ database utilizing the
> > iAnywhere.Data.SQLAnywhere NET data provider with only
> > the IP Address, DB Name, and Port? I have done some
> > serious digging into the Sybase Books Online and have
> > tried just about every iteration of ConnectionString
> > that I can think of and I cannot get it to work.
> >
> > When using this syntax it tells me that I “must
include
> > the ServerName”:
> >
> >
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > ; Host=127.0.0.1;PORT=2640)"
> >
> > However when I add the server name as such:
> >
> >
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > ; Host=127.0.0.1;PORT=2640);ServerName=MyServer"
> >
> > I get an error telling me that my “ConnectionString
has
> > invalid syntax”.
> >
> > I would like to be able to connect without the
> > ServerName! I have already modified my application to
> > utilize an ODBC connection but I would rather use the
> > native .NET data provider if possible so that my end
> > users will not have to install a stand-alone Sybase
> > client to be able to connect to the DB.
> >
> > Thanks in advance!
>
> Try using "ENG=" instead of "Servername=".
> Also, it could just be that your actual servername is
> "MyDB" rather than "MyServer".
>
> HTH,
>
> Rob V.
> ----------------------------------------------------------
> ------- Rob Verschoor
>
> Certified Sybase Professional DBA for ASE
> 15.0/12.5/12.0/11.5/11.0 and Replication Server
> 15.0.1/12.5 // TeamSybase
>
> Author of Sybase books (order online at
> www.sypron.nl/shop): "Tips, Tricks& Recipes for Sybase
> ASE" (ASE 15 edition) "The Complete Sybase ASE Quick
> Reference Guide" "The Complete Sybase Replication Server
> Quick Reference Guide"
>
> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
> Commerce 27138666
> ----------------------------------------------------------
> -------
>


Aaron G Posted on 2011-05-10 00:44:43.0Z
Sender: 557e.4dc852b4.1804289383@sybase.com
From: Aaron G
Newsgroups: sybase.public.iq
Subject: Re: IQ Connection String Syntax???
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4dc88a7b.5978.1681692777@sybase.com>
References: <4dc7c3ba.472b.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 9 May 2011 17:44:43 -0700
X-Trace: forums-1-dub 1304988283 10.22.241.41 (9 May 2011 17:44:43 -0700)
X-Original-Trace: 9 May 2011 17:44:43 -0700, 10.22.241.41
Lines: 138
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4359
Article PK: 246499

Thank you for the responses. I have done some more
troubleshooting and I think I have found something
interesting.

It looks like my problem stems from the fact that my DBN and
my ENG have the same exact value.

The correct values are:
DBN=swhdb
ENG=swhdb


When I use the correct DBN but an incorrect ENG, I receive
this error message: "Database server not found"

When I use the correct ENG but an incorrect DBN, I receive
this error message: "Specified database not found"

When I set both the DBN and ENG equal to the same correct
value (swhdb), the .Net Provider gives me this error
message: "Invalid statement".


Any idea on how to get around this???

> I agree with Rob, but I prefer OLEDB
>
> example:-
> Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
> Security=false;LINKS=tcpip(host=MY_HOST;port=1234)
>
> On thing to be aware of this that .NET uses connection
> pooling and even if you close and dispose a connection
> object the connection will STILL remain on the database
> for about 60 seconds. This is fine if you are connecting
> via middleware server but if you are writng a
> client/server application then consider also adding the
> folloiwng attribute to your connection string to turn
> pooling off:-
>
> OLE DB Services=-2
>
> The reason you will want it off is that if you use global
> temps then they will retain the data from the previous
> command, or you may have hundreds of connections held open
> doing nothing. The choice is application specific but it
> is something to be aware of.
>
> Trev
>
> > On 08-May-2011 01:45, Aaron G wrote:
> > > I am writing a .NET application within Visual Studio
> > > 2010 and I am trying to use the
> > > iAnywhere.Data.SQLAnywhere .NET data provider to
> > > connect to a Sybase IQ database. Basically, I am
> > > having trouble getting the correct ConnectionString
> > > syntax. Part of my trouble is that I am trying to
> > > connect to the DB utilizing only the IP Address, DB
> > > Name, and Port (No ServerName). No matter how I
> > > structure the ConnectionString, it gives me an error
> > > stating that I must include the ServerName. However,
> > when I add the server name it tells me that my
> > > ConnectionString has invalid syntax.
> > >
> > > What is the correct ConnectionString syntax to connect
> > > to a Sybase IQ database utilizing the
> > > iAnywhere.Data.SQLAnywhere NET data provider with only
> > > the IP Address, DB Name, and Port? I have done some
> > > serious digging into the Sybase Books Online and have
> > > tried just about every iteration of ConnectionString
> > > that I can think of and I cannot get it to work.
> > >
> > > When using this syntax it tells me that I “must
> include
> > > the ServerName”:
> > >
> > >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > > ; Host=127.0.0.1;PORT=2640)"
> > >
> > > However when I add the server name as such:
> > >
> > >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > > ; Host=127.0.0.1;PORT=2640);ServerName=MyServer"
> > >
> > > I get an error telling me that my “ConnectionString
> has
> > > invalid syntax”.
> > >
> > > I would like to be able to connect without the
> > > ServerName! I have already modified my application to
> > > utilize an ODBC connection but I would rather use the
> > > native .NET data provider if possible so that my end
> > > users will not have to install a stand-alone Sybase
> > > client to be able to connect to the DB.
> > >
> > > Thanks in advance!
> >
> > Try using "ENG=" instead of "Servername=".
> > Also, it could just be that your actual servername is
> > "MyDB" rather than "MyServer".
> >
> > HTH,
> >
> > Rob V.
> >
> >
> ----------------------------------------------------------
> ------- Rob Verschoor >
> > Certified Sybase Professional DBA for ASE
> > 15.0/12.5/12.0/11.5/11.0 and Replication Server
> > 15.0.1/12.5 // TeamSybase
> >
> > Author of Sybase books (order online at
> > www.sypron.nl/shop): "Tips, Tricks& Recipes for Sybase
> > ASE" (ASE 15 edition) "The Complete Sybase ASE Quick
> > Reference Guide" "The Complete Sybase Replication Server
> > Quick Reference Guide"
> >
> > rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> > @rob_verschoor Sypron B.V., The Netherlands | Chamber
> > of Commerce 27138666
> >
> >
> ----------------------------------------------------------
> ------- >


Harpreet Chaudhary [Sybase, an SAP Company] Posted on 2011-05-10 14:24:47.0Z
From: "Harpreet Chaudhary [Sybase, an SAP Company]" <harpreet.chaudhary@sybase.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6
MIME-Version: 1.0
Newsgroups: sybase.public.iq
Subject: Re: IQ Connection String Syntax???
References: <4dc7c3ba.472b.1681692777@sybase.com> <4dc88a7b.5978.1681692777@sybase.com>
In-Reply-To: <4dc88a7b.5978.1681692777@sybase.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4dc94aaf$1@forums-1-dub>
Date: 10 May 2011 07:24:47 -0700
X-Trace: forums-1-dub 1305037487 10.22.241.152 (10 May 2011 07:24:47 -0700)
X-Original-Trace: 10 May 2011 07:24:47 -0700, vip152.sybase.com
Lines: 144
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4360
Article PK: 246500

can you try just the following:
"uid=xxx;pwd=xxx;eng=<server_name>;links=tcpip{host=127.0.01;port=2640;dobradcast=direct}"

On 5/9/2011 8:44 PM, Aaron G wrote:
> Thank you for the responses. I have done some more
> troubleshooting and I think I have found something
> interesting.
>
> It looks like my problem stems from the fact that my DBN and
> my ENG have the same exact value.
>
> The correct values are:
> DBN=swhdb
> ENG=swhdb
>
>
> When I use the correct DBN but an incorrect ENG, I receive
> this error message: "Database server not found"
>
> When I use the correct ENG but an incorrect DBN, I receive
> this error message: "Specified database not found"
>
> When I set both the DBN and ENG equal to the same correct
> value (swhdb), the .Net Provider gives me this error
> message: "Invalid statement".
>
>
> Any idea on how to get around this???
>
>
>
>
>
>
>
>
>
>
>> I agree with Rob, but I prefer OLEDB
>>
>> example:-
>> Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
>> Security=false;LINKS=tcpip(host=MY_HOST;port=1234)
>>
>> On thing to be aware of this that .NET uses connection
>> pooling and even if you close and dispose a connection
>> object the connection will STILL remain on the database
>> for about 60 seconds. This is fine if you are connecting
>> via middleware server but if you are writng a
>> client/server application then consider also adding the
>> folloiwng attribute to your connection string to turn
>> pooling off:-
>>
>> OLE DB Services=-2
>>
>> The reason you will want it off is that if you use global
>> temps then they will retain the data from the previous
>> command, or you may have hundreds of connections held open
>> doing nothing. The choice is application specific but it
>> is something to be aware of.
>>
>> Trev
>>
>>> On 08-May-2011 01:45, Aaron G wrote:
>>>> I am writing a .NET application within Visual Studio
>>>> 2010 and I am trying to use the
>>>> iAnywhere.Data.SQLAnywhere .NET data provider to
>>>> connect to a Sybase IQ database. Basically, I am
>>>> having trouble getting the correct ConnectionString
>>>> syntax. Part of my trouble is that I am trying to
>>>> connect to the DB utilizing only the IP Address, DB
>>>> Name, and Port (No ServerName). No matter how I
>>>> structure the ConnectionString, it gives me an error
>>>> stating that I must include the ServerName. However,
>>> when I add the server name it tells me that my
>>>> ConnectionString has invalid syntax.
>>>>
>>>> What is the correct ConnectionString syntax to connect
>>>> to a Sybase IQ database utilizing the
>>>> iAnywhere.Data.SQLAnywhere NET data provider with only
>>>> the IP Address, DB Name, and Port? I have done some
>>>> serious digging into the Sybase Books Online and have
>>>> tried just about every iteration of ConnectionString
>>>> that I can think of and I cannot get it to work.
>>>>
>>>> When using this syntax it tells me that I “must
>> include
>>>> the ServerName”:
>>>>
>>>>
>>
> "UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
>>>> ; Host=127.0.0.1;PORT=2640)"
>>>>
>>>> However when I add the server name as such:
>>>>
>>>>
>>
> "UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
>>>> ; Host=127.0.0.1;PORT=2640);ServerName=MyServer"
>>>>
>>>> I get an error telling me that my “ConnectionString
>> has
>>>> invalid syntax”.
>>>>
>>>> I would like to be able to connect without the
>>>> ServerName! I have already modified my application to
>>>> utilize an ODBC connection but I would rather use the
>>>> native .NET data provider if possible so that my end
>>>> users will not have to install a stand-alone Sybase
>>>> client to be able to connect to the DB.
>>>>
>>>> Thanks in advance!
>>>
>>> Try using "ENG=" instead of "Servername=".
>>> Also, it could just be that your actual servername is
>>> "MyDB" rather than "MyServer".
>>>
>>> HTH,
>>>
>>> Rob V.
>>>
>>>
>> ----------------------------------------------------------
>> ------- Rob Verschoor>
>>> Certified Sybase Professional DBA for ASE
>>> 15.0/12.5/12.0/11.5/11.0 and Replication Server
>>> 15.0.1/12.5 // TeamSybase
>>>
>>> Author of Sybase books (order online at
>>> www.sypron.nl/shop): "Tips, Tricks& Recipes for Sybase
>>> ASE" (ASE 15 edition) "The Complete Sybase ASE Quick
>>> Reference Guide" "The Complete Sybase Replication Server
>>> Quick Reference Guide"
>>>
>>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
>>> @rob_verschoor Sypron B.V., The Netherlands | Chamber
>>> of Commerce 27138666
>>>
>>>
>> ----------------------------------------------------------
>> ------->


Aaron G Posted on 2011-05-10 17:43:47.0Z
Sender: 557e.4dc852b4.1804289383@sybase.com
From: Aaron G
Newsgroups: sybase.public.iq
Subject: Re: IQ Connection String Syntax???
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4dc97953.6f64.1681692777@sybase.com>
References: <4dc94aaf$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 May 2011 10:43:47 -0700
X-Trace: forums-1-dub 1305049427 10.22.241.41 (10 May 2011 10:43:47 -0700)
X-Original-Trace: 10 May 2011 10:43:47 -0700, 10.22.241.41
Lines: 168
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4361
Article PK: 246501

I tried the format below and it still does not work.

If I don't include the DBN in the connection string, the
.Net Provider gives me an "Invalid Statement" error.

If I include the DBN with no ENG, I get an error stating
"Connection error: TCPIP requires a server name".

However when I include both the DBN and ENG, and they are
set to the same value (in my case "swhdb" as this is how my
server is set up) I always get the "Invalid Statement"
error.

> can you try just the following:
> "uid=xxx;pwd=xxx;eng=<server_name>
>
;links=tcpip{host=127.0.01;port=2640;dobradcast=direct}"
>
>
>
> On 5/9/2011 8:44 PM, Aaron G wrote:
> > Thank you for the responses. I have done some more
> > troubleshooting and I think I have found something
> > interesting.
> >
> > It looks like my problem stems from the fact that my DBN
> > and my ENG have the same exact value.
> >
> > The correct values are:
> > DBN=swhdb
> > ENG=swhdb
> >
> >
> > When I use the correct DBN but an incorrect ENG, I
> > receive this error message: "Database server not found"
> >
> > When I use the correct ENG but an incorrect DBN, I
> > receive this error message: "Specified database not
> found" >
> > When I set both the DBN and ENG equal to the same
> > correct value (swhdb), the .Net Provider gives me this
> > error message: "Invalid statement".
> >
> >
> > Any idea on how to get around this???
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >> I agree with Rob, but I prefer OLEDB
> >>
> >> example:-
> >>
Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
> >>
Security=false;LINKS=tcpip(host=MY_HOST;port=1234)
> >>
> >> On thing to be aware of this that .NET uses connection
> >> pooling and even if you close and dispose a connection
> >> object the connection will STILL remain on the database
> >> for about 60 seconds. This is fine if you are
> connecting >> via middleware server but if you are writng
> a >> client/server application then consider also adding
> the >> folloiwng attribute to your connection string to
> turn >> pooling off:-
> >>
> >> OLE DB Services=-2
> >>
> >> The reason you will want it off is that if you use
> global >> temps then they will retain the data from the
> previous >> command, or you may have hundreds of
> connections held open >> doing nothing. The choice is
> application specific but it >> is something to be aware
> of. >>
> >> Trev
> >>
> >>> On 08-May-2011 01:45, Aaron G wrote:
> >>>> I am writing a .NET application within Visual Studio
> >>>> 2010 and I am trying to use the
> >>>> iAnywhere.Data.SQLAnywhere .NET data provider to
> >>>> connect to a Sybase IQ database. Basically, I am
> >>>> having trouble getting the correct ConnectionString
> >>>> syntax. Part of my trouble is that I am trying to
> >>>> connect to the DB utilizing only the IP Address, DB
> >>>> Name, and Port (No ServerName). No matter how I
> >>>> structure the ConnectionString, it gives me an error
> >>>> stating that I must include the ServerName. However,
> >>> when I add the server name it tells me that my
> >>>> ConnectionString has invalid syntax.
> >>>>
> >>>> What is the correct ConnectionString syntax to
> connect >>>> to a Sybase IQ database utilizing the
> >>>> iAnywhere.Data.SQLAnywhere NET data provider with
> only >>>> the IP Address, DB Name, and Port? I have done
> some >>>> serious digging into the Sybase Books Online and
> have >>>> tried just about every iteration of
> ConnectionString >>>> that I can think of and I cannot get
> it to work. >>>>
> >>>> When using this syntax it tells me that I “must
> >> include
> >>>> the ServerName”:
> >>>>
> >>>>
> >>
> >
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> >>>> ; Host=127.0.0.1;PORT=2640)"
> >>>>
> >>>> However when I add the server name as such:
> >>>>
> >>>>
> >>
> >
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> >>>> ;
Host=127.0.0.1;PORT=2640);ServerName=MyServer"
> >>>>
> >>>> I get an error telling me that my “ConnectionString
> >> has
> >>>> invalid syntax”.
> >>>>
> >>>> I would like to be able to connect without the
> >>>> ServerName! I have already modified my application to
> >>>> utilize an ODBC connection but I would rather use the
> >>>> native .NET data provider if possible so that my end
> >>>> users will not have to install a stand-alone Sybase
> >>>> client to be able to connect to the DB.
> >>>>
> >>>> Thanks in advance!
> >>>
> >>> Try using "ENG=" instead of "Servername=".
> >>> Also, it could just be that your actual servername is
> >>> "MyDB" rather than "MyServer".
> >>>
> >>> HTH,
> >>>
> >>> Rob V.
> >>>
> >>>
> >>
> ----------------------------------------------------------
> >> ------- Rob Verschoor> >>> Certified Sybase
> Professional DBA for ASE >>> 15.0/12.5/12.0/11.5/11.0 and
> Replication Server >>> 15.0.1/12.5 // TeamSybase
> >>>
> >>> Author of Sybase books (order online at
> >>> www.sypron.nl/shop): "Tips, Tricks& Recipes for
> Sybase >>> ASE" (ASE 15 edition) "The Complete Sybase ASE
> Quick >>> Reference Guide" "The Complete Sybase
> Replication Server >>> Quick Reference Guide"
> >>>
> >>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> >>> @rob_verschoor Sypron B.V., The Netherlands |
> Chamber >>> of Commerce 27138666
> >>>
> >>>
> >>
> ----------------------------------------------------------
> >> ------->


Michael Garza Posted on 2011-05-15 19:38:42.0Z
From: "Michael Garza" <mikeagarza@gmail.com>
Newsgroups: sybase.public.iq
References: <4dc94aaf$1@forums-1-dub> <4dc97953.6f64.1681692777@sybase.com>
In-Reply-To: <4dc97953.6f64.1681692777@sybase.com>
Subject: Re: IQ Connection String Syntax???
Lines: 8
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3508.1109
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3508.1109
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4dd02bc2$1@forums-1-dub>
Date: 15 May 2011 12:38:42 -0700
X-Trace: forums-1-dub 1305488322 10.22.241.152 (15 May 2011 12:38:42 -0700)
X-Original-Trace: 15 May 2011 12:38:42 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4366
Article PK: 246506

If you are connecting an IQ server below version 15, there is a bug in the
ADO.Net driver that will give you an "Invalid Statement" error when
connecting. I currently have a technical support case (11645407, CR 652929)
for this and you should see it fixed in the driver that ships with IQ 15.3.

"Aaron G" wrote in message news:4dc97953.6f64.1681692777@sybase.com...


I tried the format below and it still does not work.

If I don't include the DBN in the connection string, the
Net Provider gives me an "Invalid Statement" error.

If I include the DBN with no ENG, I get an error stating
"Connection error: TCPIP requires a server name".

However when I include both the DBN and ENG, and they are
set to the same value (in my case "swhdb" as this is how my
server is set up) I always get the "Invalid Statement"
error.

> can you try just the following:
> "uid=xxx;pwd=xxx;eng=<server_name>
>
;links=tcpip{host=127.0.01;port=2640;dobradcast=direct}"
>
>
>
> On 5/9/2011 8:44 PM, Aaron G wrote:
> > Thank you for the responses. I have done some more
> > troubleshooting and I think I have found something
> > interesting.
> >
> > It looks like my problem stems from the fact that my DBN
> > and my ENG have the same exact value.
> >
> > The correct values are:
> > DBN=swhdb
> > ENG=swhdb
> >
> >
> > When I use the correct DBN but an incorrect ENG, I
> > receive this error message: "Database server not found"
> >
> > When I use the correct ENG but an incorrect DBN, I
> > receive this error message: "Specified database not
> found" >
> > When I set both the DBN and ENG equal to the same
> > correct value (swhdb), the .Net Provider gives me this
> > error message: "Invalid statement".
> >
> >
> > Any idea on how to get around this???
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >> I agree with Rob, but I prefer OLEDB
> >>
> >> example:-
> >>
Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
> >>
Security=false;LINKS=tcpip(host=MY_HOST;port=1234)
> >>
> >> On thing to be aware of this that .NET uses connection
> >> pooling and even if you close and dispose a connection
> >> object the connection will STILL remain on the database
> >> for about 60 seconds. This is fine if you are
> connecting >> via middleware server but if you are writng
> a >> client/server application then consider also adding
> the >> folloiwng attribute to your connection string to
> turn >> pooling off:-
> >>
> >> OLE DB Services=-2
> >>
> >> The reason you will want it off is that if you use
> global >> temps then they will retain the data from the
> previous >> command, or you may have hundreds of
> connections held open >> doing nothing. The choice is
> application specific but it >> is something to be aware
> of. >>
> >> Trev
> >>
> >>> On 08-May-2011 01:45, Aaron G wrote:
> >>>> I am writing a .NET application within Visual Studio
> >>>> 2010 and I am trying to use the
> >>>> iAnywhere.Data.SQLAnywhere .NET data provider to
> >>>> connect to a Sybase IQ database. Basically, I am
> >>>> having trouble getting the correct ConnectionString
> >>>> syntax. Part of my trouble is that I am trying to
> >>>> connect to the DB utilizing only the IP Address, DB
> >>>> Name, and Port (No ServerName). No matter how I
> >>>> structure the ConnectionString, it gives me an error
> >>>> stating that I must include the ServerName. However,
> >>> when I add the server name it tells me that my
> >>>> ConnectionString has invalid syntax.
> >>>>
> >>>> What is the correct ConnectionString syntax to
> connect >>>> to a Sybase IQ database utilizing the
> >>>> iAnywhere.Data.SQLAnywhere NET data provider with
> only >>>> the IP Address, DB Name, and Port? I have done
> some >>>> serious digging into the Sybase Books Online and
> have >>>> tried just about every iteration of
> ConnectionString >>>> that I can think of and I cannot get
> it to work. >>>>
> >>>> When using this syntax it tells me that I “must
> >> include
> >>>> the ServerName”:
> >>>>
> >>>>
> >>
> >
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> >>>> ; Host=127.0.0.1;PORT=2640)"
> >>>>
> >>>> However when I add the server name as such:
> >>>>
> >>>>
> >>
> >
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> >>>> ;
Host=127.0.0.1;PORT=2640);ServerName=MyServer"
> >>>>
> >>>> I get an error telling me that my “ConnectionString
> >> has
> >>>> invalid syntax”.
> >>>>
> >>>> I would like to be able to connect without the
> >>>> ServerName! I have already modified my application to
> >>>> utilize an ODBC connection but I would rather use the
> >>>> native .NET data provider if possible so that my end
> >>>> users will not have to install a stand-alone Sybase
> >>>> client to be able to connect to the DB.
> >>>>
> >>>> Thanks in advance!
> >>>
> >>> Try using "ENG=" instead of "Servername=".
> >>> Also, it could just be that your actual servername is
> >>> "MyDB" rather than "MyServer".
> >>>
> >>> HTH,
> >>>
> >>> Rob V.
> >>>
> >>>
> >>
> ----------------------------------------------------------
> >> ------- Rob Verschoor> >>> Certified Sybase
> Professional DBA for ASE >>> 15.0/12.5/12.0/11.5/11.0 and
> Replication Server >>> 15.0.1/12.5 // TeamSybase
> >>>
> >>> Author of Sybase books (order online at
> >>> www.sypron.nl/shop): "Tips, Tricks& Recipes for
> Sybase >>> ASE" (ASE 15 edition) "The Complete Sybase ASE
> Quick >>> Reference Guide" "The Complete Sybase
> Replication Server >>> Quick Reference Guide"
> >>>
> >>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> >>> @rob_verschoor Sypron B.V., The Netherlands |
> Chamber >>> of Commerce 27138666
> >>>
> >>>
> >>
> ----------------------------------------------------------
> >> ------->


Any idea when the new ADO.Net driver is going to be available? Posted on 2011-05-26 00:01:41.0Z
Sender: 3538.4ddd93f4.1804289383@sybase.com
From: Any idea when the new ADO.Net driver is going to be available?
Newsgroups: sybase.public.iq
Subject: Re: IQ Connection String Syntax???
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ddd9865.35f7.1681692777@sybase.com>
References: <4dd02bc2$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 May 2011 17:01:41 -0700
X-Trace: forums-1-dub 1306368101 10.22.241.41 (25 May 2011 17:01:41 -0700)
X-Original-Trace: 25 May 2011 17:01:41 -0700, 10.22.241.41
Lines: 186
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4373
Article PK: 246512


> If you are connecting an IQ server below version 15, there
> is a bug in the ADO.Net driver that will give you an
> "Invalid Statement" error when connecting. I currently
> have a technical support case (11645407, CR 652929) for
> this and you should see it fixed in the driver that ships
> with IQ 15.3.
>
> "Aaron G" wrote in message
> news:4dc97953.6f64.1681692777@sybase.com...
>
>
> I tried the format below and it still does not work.
>
> If I don't include the DBN in the connection string, the
> Net Provider gives me an "Invalid Statement" error.
>
> If I include the DBN with no ENG, I get an error stating
> "Connection error: TCPIP requires a server name".
>
> However when I include both the DBN and ENG, and they are
> set to the same value (in my case "swhdb" as this is how
> my server is set up) I always get the "Invalid Statement"
> error.
>
>
>
> > can you try just the following:
> > "uid=xxx;pwd=xxx;eng=<server_name>
> >
>
;links=tcpip{host=127.0.01;port=2640;dobradcast=direct}"
> >
> >
> >
> > On 5/9/2011 8:44 PM, Aaron G wrote:
> > > Thank you for the responses. I have done some more
> > > troubleshooting and I think I have found something
> > > interesting.
> > >
> > > It looks like my problem stems from the fact that my
> > > DBN and my ENG have the same exact value.
> > >
> > > The correct values are:
> > > DBN=swhdb
> > > ENG=swhdb
> > >
> > >
> > > When I use the correct DBN but an incorrect ENG, I
> > > receive this error message: "Database server not
> > found" >
> > > When I use the correct ENG but an incorrect DBN, I
> > > receive this error message: "Specified database not
> > found" >
> > > When I set both the DBN and ENG equal to the same
> > > correct value (swhdb), the .Net Provider gives me this
> > > error message: "Invalid statement".
> > >
> > >
> > > Any idea on how to get around this???
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >> I agree with Rob, but I prefer OLEDB
> > >>
> > >> example:-
> > >>
> Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
> > >>
> Security=false;LINKS=tcpip(host=MY_HOST;port=1234)
> > >>
> > >> On thing to be aware of this that .NET uses
> > connection >> pooling and even if you close and dispose
> > a connection >> object the connection will STILL remain
> > on the database >> for about 60 seconds. This is fine if
> > you are connecting >> via middleware server but if you
> > are writng a >> client/server application then consider
> > also adding the >> folloiwng attribute to your
> > connection string to turn >> pooling off:-
> > >>
> > >> OLE DB Services=-2
> > >>
> > >> The reason you will want it off is that if you use
> > global >> temps then they will retain the data from the
> > previous >> command, or you may have hundreds of
> > connections held open >> doing nothing. The choice is
> > application specific but it >> is something to be aware
> > of. >>
> > >> Trev
> > >>
> > >>> On 08-May-2011 01:45, Aaron G wrote:
> > >>>> I am writing a .NET application within Visual
> > Studio >>>> 2010 and I am trying to use the
> > >>>> iAnywhere.Data.SQLAnywhere .NET data provider to
> > >>>> connect to a Sybase IQ database. Basically, I am
> > >>>> having trouble getting the correct ConnectionString
> > >>>> syntax. Part of my trouble is that I am trying to
> > >>>> connect to the DB utilizing only the IP Address, DB
> > >>>> Name, and Port (No ServerName). No matter how I
> > >>>> structure the ConnectionString, it gives me an
> > error >>>> stating that I must include the ServerName.
> > However, >>> when I add the server name it tells me that
> > my >>>> ConnectionString has invalid syntax.
> > >>>>
> > >>>> What is the correct ConnectionString syntax to
> > connect >>>> to a Sybase IQ database utilizing the
> > >>>> iAnywhere.Data.SQLAnywhere NET data provider with
> > only >>>> the IP Address, DB Name, and Port? I have
> > done some >>>> serious digging into the Sybase Books
> > Online and have >>>> tried just about every iteration of
> > ConnectionString >>>> that I can think of and I cannot
> > get it to work. >>>>
> > >>>> When using this syntax it tells me that I
“must
> > >> include
> > >>>> the ServerName”:
> > >>>>
> > >>>>
> > >>
> > >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > >>>> ; Host=127.0.0.1;PORT=2640)"
> > >>>>
> > >>>> However when I add the server name as such:
> > >>>>
> > >>>>
> > >>
> > >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > >>>> ;
> Host=127.0.0.1;PORT=2640);ServerName=MyServer"
> > >>>>
> > >>>> I get an error telling me that my
> > “ConnectionString >> has
> > >>>> invalid syntax”.
> > >>>>
> > >>>> I would like to be able to connect without the
> > >>>> ServerName! I have already modified my application
> > to >>>> utilize an ODBC connection but I would rather
> > use the >>>> native .NET data provider if possible so
> > that my end >>>> users will not have to install a
> > stand-alone Sybase >>>> client to be able to connect to
> > the DB. >>>>
> > >>>> Thanks in advance!
> > >>>
> > >>> Try using "ENG=" instead of "Servername=".
> > >>> Also, it could just be that your actual servername
> > is >>> "MyDB" rather than "MyServer".
> > >>>
> > >>> HTH,
> > >>>
> > >>> Rob V.
> > >>>
> > >>>
> > >>
> >
> >
> ----------------------------------------------------------
> > >> ------- Rob Verschoor> >>> Certified Sybase
> > Professional DBA for ASE >>> 15.0/12.5/12.0/11.5/11.0
> > and Replication Server >>> 15.0.1/12.5 // TeamSybase >>>
> > >>> Author of Sybase books (order online at
> > >>> www.sypron.nl/shop): "Tips, Tricks& Recipes for
> > Sybase >>> ASE" (ASE 15 edition) "The Complete Sybase
> > ASE Quick >>> Reference Guide" "The Complete Sybase
> > Replication Server >>> Quick Reference Guide"
> > >>>
> > >>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> > >>> @rob_verschoor Sypron B.V., The Netherlands |
> > Chamber >>> of Commerce 27138666
> > >>>
> > >>>
> > >>
> >
> >
> ----------------------------------------------------------
> >> ------->
>


Aaron G Posted on 2011-05-26 00:03:47.0Z
Sender: 3538.4ddd93f4.1804289383@sybase.com
From: Aaron G
Newsgroups: sybase.public.iq
Subject: Re: IQ Connection String Syntax???
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ddd98e3.3608.1681692777@sybase.com>
References: <4ddd9865.35f7.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 May 2011 17:03:47 -0700
X-Trace: forums-1-dub 1306368227 10.22.241.41 (25 May 2011 17:03:47 -0700)
X-Original-Trace: 25 May 2011 17:03:47 -0700, 10.22.241.41
Lines: 197
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4374
Article PK: 246513

Any idea when the new ADO.Net driver is going to be
available?

> > If you are connecting an IQ server below version 15,
> > there is a bug in the ADO.Net driver that will give you
> > an "Invalid Statement" error when connecting. I
> > currently have a technical support case (11645407, CR
> > 652929) for this and you should see it fixed in the
> > driver that ships with IQ 15.3.
> >
> > "Aaron G" wrote in message
> > news:4dc97953.6f64.1681692777@sybase.com...
> >
> >
> > I tried the format below and it still does not work.
> >
> > If I don't include the DBN in the connection string, the
> > Net Provider gives me an "Invalid Statement" error.
> >
> > If I include the DBN with no ENG, I get an error stating
> > "Connection error: TCPIP requires a server name".
> >
> > However when I include both the DBN and ENG, and they
> > are set to the same value (in my case "swhdb" as this is
> > how my server is set up) I always get the "Invalid
> > Statement" error.
> >
> >
> >
> > > can you try just the following:
> > > "uid=xxx;pwd=xxx;eng=<server_name>
> > >
> >
>
;links=tcpip{host=127.0.01;port=2640;dobradcast=direct}"
> > >
> > >
> > >
> > > On 5/9/2011 8:44 PM, Aaron G wrote:
> > > > Thank you for the responses. I have done some more
> > > > troubleshooting and I think I have found something
> > > > interesting.
> > > >
> > > > It looks like my problem stems from the fact that my
> > > > DBN and my ENG have the same exact value.
> > > >
> > > > The correct values are:
> > > > DBN=swhdb
> > > > ENG=swhdb
> > > >
> > > >
> > > > When I use the correct DBN but an incorrect ENG, I
> > > > receive this error message: "Database server not
> > > found" >
> > > > When I use the correct ENG but an incorrect DBN, I
> > > > receive this error message: "Specified database not
> > > found" >
> > > > When I set both the DBN and ENG equal to the same
> > > > correct value (swhdb), the .Net Provider gives me
> > > > this error message: "Invalid statement".
> > > >
> > > >
> > > > Any idea on how to get around this???
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >> I agree with Rob, but I prefer OLEDB
> > > >>
> > > >> example:-
> > > >>
> >
Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
> > > >>
> >
Security=false;LINKS=tcpip(host=MY_HOST;port=1234)
> > > >>
> > > >> On thing to be aware of this that .NET uses
> > > connection >> pooling and even if you close and
> > > dispose a connection >> object the connection will
> > > STILL remain on the database >> for about 60 seconds.
> > > This is fine if you are connecting >> via middleware
> > > server but if you are writng a >> client/server
> > > application then consider also adding the >> folloiwng
> > > attribute to your connection string to turn >> pooling
> > > off:- >>
> > > >> OLE DB Services=-2
> > > >>
> > > >> The reason you will want it off is that if you use
> > > global >> temps then they will retain the data from
> > > the previous >> command, or you may have hundreds of
> > > connections held open >> doing nothing. The choice is
> > > application specific but it >> is something to be
> > > aware of. >>
> > > >> Trev
> > > >>
> > > >>> On 08-May-2011 01:45, Aaron G wrote:
> > > >>>> I am writing a .NET application within Visual
> > > Studio >>>> 2010 and I am trying to use the
> > > >>>> iAnywhere.Data.SQLAnywhere .NET data provider to
> > > >>>> connect to a Sybase IQ database. Basically, I am
> > > >>>> having trouble getting the correct
> > > ConnectionString >>>> syntax. Part of my trouble is
> > > that I am trying to >>>> connect to the DB utilizing
> > > only the IP Address, DB >>>> Name, and Port (No
> > > ServerName). No matter how I >>>> structure the
> > > ConnectionString, it gives me an error >>>> stating
> > > that I must include the ServerName. However, >>> when
> > > I add the server name it tells me that my >>>>
> > > ConnectionString has invalid syntax. >>>>
> > > >>>> What is the correct ConnectionString syntax to
> > > connect >>>> to a Sybase IQ database utilizing the
> > > >>>> iAnywhere.Data.SQLAnywhere NET data provider with
> > > only >>>> the IP Address, DB Name, and Port? I have
> > > done some >>>> serious digging into the Sybase Books
> > > Online and have >>>> tried just about every iteration
> > > of ConnectionString >>>> that I can think of and I
> > > cannot get it to work. >>>>
> > > >>>> When using this syntax it tells me that I
> “must
> > > >> include
> > > >>>> the ServerName”:
> > > >>>>
> > > >>>>
> > > >>
> > > >
> >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > > >>>> ; Host=127.0.0.1;PORT=2640)"
> > > >>>>
> > > >>>> However when I add the server name as such:
> > > >>>>
> > > >>>>
> > > >>
> > > >
> >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > > >>>> ;
> > Host=127.0.0.1;PORT=2640);ServerName=MyServer"
> > > >>>>
> > > >>>> I get an error telling me that my
> > > “ConnectionString >> has
> > > >>>> invalid syntax”.
> > > >>>>
> > > >>>> I would like to be able to connect without the
> > > >>>> ServerName! I have already modified my
> > > application to >>>> utilize an ODBC connection but I
> > > would rather use the >>>> native .NET data provider if
> > > possible so that my end >>>> users will not have to
> > > install a stand-alone Sybase >>>> client to be able to
> > > connect to the DB. >>>>
> > > >>>> Thanks in advance!
> > > >>>
> > > >>> Try using "ENG=" instead of "Servername=".
> > > >>> Also, it could just be that your actual servername
> > > is >>> "MyDB" rather than "MyServer".
> > > >>>
> > > >>> HTH,
> > > >>>
> > > >>> Rob V.
> > > >>>
> > > >>>
> > > >>
> > >
> > >
> >
> > >
> ----------------------------------------------------------
> > > >> ------- Rob Verschoor> >>> Certified Sybase
> > > Professional DBA for ASE >>> 15.0/12.5/12.0/11.5/11.0
> > > and Replication Server >>> 15.0.1/12.5 // TeamSybase
> > > >>> >>> Author of Sybase books (order online at >>>
> > > www.sypron.nl/shop): "Tips, Tricks& Recipes for
> > > Sybase >>> ASE" (ASE 15 edition) "The Complete Sybase
> > > ASE Quick >>> Reference Guide" "The Complete Sybase
> > > Replication Server >>> Quick Reference Guide" >>>
> > > >>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> > > >>> @rob_verschoor Sypron B.V., The Netherlands |
> > > Chamber >>> of Commerce 27138666
> > > >>>
> > > >>>
> > > >>
> > >
> > >
> >
> >
> ----------------------------------------------------------
> >> -------> >


Aaron G Posted on 2011-05-26 23:07:52.0Z
Sender: 3538.4ddd93f4.1804289383@sybase.com
From: Aaron G
Newsgroups: sybase.public.iq
Subject: Re: IQ Connection String Syntax???
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ddedd48.5763.1681692777@sybase.com>
References: <4ddd98e3.3608.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 May 2011 16:07:52 -0700
X-Trace: forums-1-dub 1306451272 10.22.241.41 (26 May 2011 16:07:52 -0700)
X-Original-Trace: 26 May 2011 16:07:52 -0700, 10.22.241.41
Lines: 211
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4375
Article PK: 246515

I have actually solved this problem. It was in fact a
problem with the ADO.Net provider and Sybase IQ 12.7 as Mr.
Garza stated. However, I was able to update my SQL Anywhere
to v3324 and it came along with an updated ADO.Net provider.
I was able to connect successfully!

> Any idea when the new ADO.Net driver is going to be
> available?
>
>
> > > If you are connecting an IQ server below version 15,
> > > there is a bug in the ADO.Net driver that will give
> > > you an "Invalid Statement" error when connecting. I
> > > currently have a technical support case (11645407, CR
> > > 652929) for this and you should see it fixed in the
> > > driver that ships with IQ 15.3.
> > >
> > > "Aaron G" wrote in message
> > > news:4dc97953.6f64.1681692777@sybase.com...
> > >
> > >
> > > I tried the format below and it still does not work.
> > >
> > > If I don't include the DBN in the connection string,
> > > the Net Provider gives me an "Invalid Statement"
> > error. >
> > > If I include the DBN with no ENG, I get an error
> > > stating "Connection error: TCPIP requires a server
> > name". >
> > > However when I include both the DBN and ENG, and they
> > > are set to the same value (in my case "swhdb" as this
> > > is how my server is set up) I always get the "Invalid
> > > Statement" error.
> > >
> > >
> > >
> > > > can you try just the following:
> > > > "uid=xxx;pwd=xxx;eng=<server_name>
> > > >
> > >
> >
>
;links=tcpip{host=127.0.01;port=2640;dobradcast=direct}"
> > > >
> > > >
> > > >
> > > > On 5/9/2011 8:44 PM, Aaron G wrote:
> > > > > Thank you for the responses. I have done some
> > > > > more troubleshooting and I think I have found
> > > > > something interesting.
> > > > >
> > > > > It looks like my problem stems from the fact that
> > > > > my DBN and my ENG have the same exact value.
> > > > >
> > > > > The correct values are:
> > > > > DBN=swhdb
> > > > > ENG=swhdb
> > > > >
> > > > >
> > > > > When I use the correct DBN but an incorrect ENG, I
> > > > > receive this error message: "Database server not
> > > > found" >
> > > > > When I use the correct ENG but an incorrect DBN, I
> > > > > receive this error message: "Specified database
> > > > not found" >
> > > > > When I set both the DBN and ENG equal to the same
> > > > > correct value (swhdb), the .Net Provider gives me
> > > > > this error message: "Invalid statement".
> > > > >
> > > > >
> > > > > Any idea on how to get around this???
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >> I agree with Rob, but I prefer OLEDB
> > > > >>
> > > > >> example:-
> > > > >>
> > >
> Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
> > > > >>
> > >
> Security=false;LINKS=tcpip(host=MY_HOST;port=1234)
> > > > >>
> > > > >> On thing to be aware of this that .NET uses
> > > > connection >> pooling and even if you close and
> > > > dispose a connection >> object the connection will
> > > > STILL remain on the database >> for about 60
> > > > seconds. This is fine if you are connecting >> via
> > > > middleware server but if you are writng a >>
> > > > client/server application then consider also adding
> > > > the >> folloiwng attribute to your connection string
> > > > to turn >> pooling off:- >>
> > > > >> OLE DB Services=-2
> > > > >>
> > > > >> The reason you will want it off is that if you
> > > > use global >> temps then they will retain the data
> > > > from the previous >> command, or you may have
> > > > hundreds of connections held open >> doing nothing.
> > > > The choice is application specific but it >> is
> > > > something to be aware of. >>
> > > > >> Trev
> > > > >>
> > > > >>> On 08-May-2011 01:45, Aaron G wrote:
> > > > >>>> I am writing a .NET application within Visual
> > > > Studio >>>> 2010 and I am trying to use the
> > > > >>>> iAnywhere.Data.SQLAnywhere .NET data provider
> > > > to >>>> connect to a Sybase IQ database. Basically,
> > > > I am >>>> having trouble getting the correct
> > > > ConnectionString >>>> syntax. Part of my trouble is
> > > > that I am trying to >>>> connect to the DB utilizing
> > > > only the IP Address, DB >>>> Name, and Port (No
> > > > ServerName). No matter how I >>>> structure the
> > > > ConnectionString, it gives me an error >>>> stating
> > > > that I must include the ServerName. However, >>>
> > > > when I add the server name it tells me that my >>>>
> > > > ConnectionString has invalid syntax. >>>>
> > > > >>>> What is the correct ConnectionString syntax to
> > > > connect >>>> to a Sybase IQ database utilizing the
> > > > >>>> iAnywhere.Data.SQLAnywhere NET data provider
> > > > with only >>>> the IP Address, DB Name, and Port? I
> > > > have done some >>>> serious digging into the Sybase
> > > > Books Online and have >>>> tried just about every
> > > > iteration of ConnectionString >>>> that I can think
> > > > of and I cannot get it to work. >>>>
> > > > >>>> When using this syntax it tells me that I
> > “must
> > > > >> include
> > > > >>>> the ServerName”:
> > > > >>>>
> > > > >>>>
> > > > >>
> > > > >
> > >
> >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > > > >>>> ; Host=127.0.0.1;PORT=2640)"
> > > > >>>>
> > > > >>>> However when I add the server name as such:
> > > > >>>>
> > > > >>>>
> > > > >>
> > > > >
> > >
> >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > > > >>>> ;
> > > Host=127.0.0.1;PORT=2640);ServerName=MyServer"
> > > > >>>>
> > > > >>>> I get an error telling me that my
> > > > “ConnectionString >> has
> > > > >>>> invalid syntax”.
> > > > >>>>
> > > > >>>> I would like to be able to connect without the
> > > > >>>> ServerName! I have already modified my
> > > > application to >>>> utilize an ODBC connection but I
> > > > would rather use the >>>> native .NET data provider
> > > > if possible so that my end >>>> users will not have
> > > > to install a stand-alone Sybase >>>> client to be
> > > > able to connect to the DB. >>>>
> > > > >>>> Thanks in advance!
> > > > >>>
> > > > >>> Try using "ENG=" instead of "Servername=".
> > > > >>> Also, it could just be that your actual
> > > > servername is >>> "MyDB" rather than "MyServer".
> > > > >>>
> > > > >>> HTH,
> > > > >>>
> > > > >>> Rob V.
> > > > >>>
> > > > >>>
> > > > >>
> > > >
> > > >
> > >
> > > >
> >
> > > >
> ----------------------------------------------------------
> > > > >> ------- Rob Verschoor> >>> Certified Sybase
> > > > Professional DBA for ASE >>>
> 15.0/12.5/12.0/11.5/11.0 and Replication Server >>>
> > > > 15.0.1/12.5 // TeamSybase >>> >>> Author of Sybase
> > > > books (order online at >>> www.sypron.nl/shop):
> > > > "Tips, Tricks& Recipes for Sybase >>> ASE" (ASE 15
> > > > edition) "The Complete Sybase ASE Quick >>>
> > > > Reference Guide" "The Complete Sybase Replication
> > > > Server >>> Quick Reference Guide" >>> >>>
> > > > rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> > > > >>> @rob_verschoor Sypron B.V., The Netherlands |
> > > > Chamber >>> of Commerce 27138666 >>>
> > > > >>>
> > > > >>
> > > >
> > > >
> > >
> > >
> >
> >
> ----------------------------------------------------------
> >> -------> >


Michael Garza Posted on 2011-05-27 03:29:51.0Z
From: "Michael Garza" <mikeagarza@gmail.com>
Newsgroups: sybase.public.iq
References: <4ddd98e3.3608.1681692777@sybase.com> <4ddedd48.5763.1681692777@sybase.com>
In-Reply-To: <4ddedd48.5763.1681692777@sybase.com>
Subject: Re: IQ Connection String Syntax???
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3508.1109
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3508.1109
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ddf1aaf$1@forums-1-dub>
Date: 26 May 2011 20:29:51 -0700
X-Trace: forums-1-dub 1306466991 10.22.241.152 (26 May 2011 20:29:51 -0700)
X-Original-Trace: 26 May 2011 20:29:51 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.iq:4376
Article PK: 246516

Glad to hear it is working for you now.

"Aaron G" wrote in message news:4ddedd48.5763.1681692777@sybase.com...

I have actually solved this problem. It was in fact a
problem with the ADO.Net provider and Sybase IQ 12.7 as Mr.
Garza stated. However, I was able to update my SQL Anywhere
to v3324 and it came along with an updated ADO.Net provider.
I was able to connect successfully!

> Any idea when the new ADO.Net driver is going to be
> available?
>
>
> > > If you are connecting an IQ server below version 15,
> > > there is a bug in the ADO.Net driver that will give
> > > you an "Invalid Statement" error when connecting. I
> > > currently have a technical support case (11645407, CR
> > > 652929) for this and you should see it fixed in the
> > > driver that ships with IQ 15.3.
> > >
> > > "Aaron G" wrote in message
> > > news:4dc97953.6f64.1681692777@sybase.com...
> > >
> > >
> > > I tried the format below and it still does not work.
> > >
> > > If I don't include the DBN in the connection string,
> > > the Net Provider gives me an "Invalid Statement"
> > error. >
> > > If I include the DBN with no ENG, I get an error
> > > stating "Connection error: TCPIP requires a server
> > name". >
> > > However when I include both the DBN and ENG, and they
> > > are set to the same value (in my case "swhdb" as this
> > > is how my server is set up) I always get the "Invalid
> > > Statement" error.
> > >
> > >
> > >
> > > > can you try just the following:
> > > > "uid=xxx;pwd=xxx;eng=<server_name>
> > > >
> > >
> >
>
;links=tcpip{host=127.0.01;port=2640;dobradcast=direct}"
> > > >
> > > >
> > > >
> > > > On 5/9/2011 8:44 PM, Aaron G wrote:
> > > > > Thank you for the responses. I have done some
> > > > > more troubleshooting and I think I have found
> > > > > something interesting.
> > > > >
> > > > > It looks like my problem stems from the fact that
> > > > > my DBN and my ENG have the same exact value.
> > > > >
> > > > > The correct values are:
> > > > > DBN=swhdb
> > > > > ENG=swhdb
> > > > >
> > > > >
> > > > > When I use the correct DBN but an incorrect ENG, I
> > > > > receive this error message: "Database server not
> > > > found" >
> > > > > When I use the correct ENG but an incorrect DBN, I
> > > > > receive this error message: "Specified database
> > > > not found" >
> > > > > When I set both the DBN and ENG equal to the same
> > > > > correct value (swhdb), the .Net Provider gives me
> > > > > this error message: "Invalid statement".
> > > > >
> > > > >
> > > > > Any idea on how to get around this???
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >> I agree with Rob, but I prefer OLEDB
> > > > >>
> > > > >> example:-
> > > > >>
> > >
> Provider=SAOLEDB;ENG=DB_NAME;DBN=DB_NAME;Integrated
> > > > >>
> > >
> Security=false;LINKS=tcpip(host=MY_HOST;port=1234)
> > > > >>
> > > > >> On thing to be aware of this that .NET uses
> > > > connection >> pooling and even if you close and
> > > > dispose a connection >> object the connection will
> > > > STILL remain on the database >> for about 60
> > > > seconds. This is fine if you are connecting >> via
> > > > middleware server but if you are writng a >>
> > > > client/server application then consider also adding
> > > > the >> folloiwng attribute to your connection string
> > > > to turn >> pooling off:- >>
> > > > >> OLE DB Services=-2
> > > > >>
> > > > >> The reason you will want it off is that if you
> > > > use global >> temps then they will retain the data
> > > > from the previous >> command, or you may have
> > > > hundreds of connections held open >> doing nothing.
> > > > The choice is application specific but it >> is
> > > > something to be aware of. >>
> > > > >> Trev
> > > > >>
> > > > >>> On 08-May-2011 01:45, Aaron G wrote:
> > > > >>>> I am writing a .NET application within Visual
> > > > Studio >>>> 2010 and I am trying to use the
> > > > >>>> iAnywhere.Data.SQLAnywhere .NET data provider
> > > > to >>>> connect to a Sybase IQ database. Basically,
> > > > I am >>>> having trouble getting the correct
> > > > ConnectionString >>>> syntax. Part of my trouble is
> > > > that I am trying to >>>> connect to the DB utilizing
> > > > only the IP Address, DB >>>> Name, and Port (No
> > > > ServerName). No matter how I >>>> structure the
> > > > ConnectionString, it gives me an error >>>> stating
> > > > that I must include the ServerName. However, >>>
> > > > when I add the server name it tells me that my >>>>
> > > > ConnectionString has invalid syntax. >>>>
> > > > >>>> What is the correct ConnectionString syntax to
> > > > connect >>>> to a Sybase IQ database utilizing the
> > > > >>>> iAnywhere.Data.SQLAnywhere NET data provider
> > > > with only >>>> the IP Address, DB Name, and Port? I
> > > > have done some >>>> serious digging into the Sybase
> > > > Books Online and have >>>> tried just about every
> > > > iteration of ConnectionString >>>> that I can think
> > > > of and I cannot get it to work. >>>>
> > > > >>>> When using this syntax it tells me that I
> > “must
> > > > >> include
> > > > >>>> the ServerName”:
> > > > >>>>
> > > > >>>>
> > > > >>
> > > > >
> > >
> >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > > > >>>> ; Host=127.0.0.1;PORT=2640)"
> > > > >>>>
> > > > >>>> However when I add the server name as such:
> > > > >>>>
> > > > >>>>
> > > > >>
> > > > >
> > >
> >
>
"UID=***;PWD=***;DBN=MyDB;links=tcpip(DOBROADCAST=DIRECT
> > > > >>>> ;
> > > Host=127.0.0.1;PORT=2640);ServerName=MyServer"
> > > > >>>>
> > > > >>>> I get an error telling me that my
> > > > “ConnectionString >> has
> > > > >>>> invalid syntax”.
> > > > >>>>
> > > > >>>> I would like to be able to connect without the
> > > > >>>> ServerName! I have already modified my
> > > > application to >>>> utilize an ODBC connection but I
> > > > would rather use the >>>> native .NET data provider
> > > > if possible so that my end >>>> users will not have
> > > > to install a stand-alone Sybase >>>> client to be
> > > > able to connect to the DB. >>>>
> > > > >>>> Thanks in advance!
> > > > >>>
> > > > >>> Try using "ENG=" instead of "Servername=".
> > > > >>> Also, it could just be that your actual
> > > > servername is >>> "MyDB" rather than "MyServer".
> > > > >>>
> > > > >>> HTH,
> > > > >>>
> > > > >>> Rob V.
> > > > >>>
> > > > >>>
> > > > >>
> > > >
> > > >
> > >
> > > >
> >
> > > >
> ----------------------------------------------------------
> > > > >> ------- Rob Verschoor> >>> Certified Sybase
> > > > Professional DBA for ASE >>>
> 15.0/12.5/12.0/11.5/11.0 and Replication Server >>>
> > > > 15.0.1/12.5 // TeamSybase >>> >>> Author of Sybase
> > > > books (order online at >>> www.sypron.nl/shop):
> > > > "Tips, Tricks& Recipes for Sybase >>> ASE" (ASE 15
> > > > edition) "The Complete Sybase ASE Quick >>>
> > > > Reference Guide" "The Complete Sybase Replication
> > > > Server >>> Quick Reference Guide" >>> >>>
> > > > rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> > > > >>> @rob_verschoor Sypron B.V., The Netherlands |
> > > > Chamber >>> of Commerce 27138666 >>>
> > > > >>>
> > > > >>
> > > >
> > > >
> > >
> > >
> >
> >
> ----------------------------------------------------------
> >> -------> >