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.

Connect to .db database file using vb.net

6 posts in General Discussion Last posting was on 2007-05-16 14:52:12.0Z
sri Posted on 2007-05-11 01:04:09.0Z
Sender: 51f6.462a9493.1804289383@sybase.com
From: sri
Newsgroups: ianywhere.public.general
Subject: Connect to .db database file using vb.net
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4643c109.46ae.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 May 2007 18:04:09 -0700
X-Trace: forums-1-dub 1178845449 10.22.241.41 (10 May 2007 18:04:09 -0700)
X-Original-Trace: 10 May 2007 18:04:09 -0700, 10.22.241.41
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5993
Article PK: 2455

how can i connect to mydb.db (ver 7) database in vb.net
application. I have tried the following code but, getting a
message "Specified database not found"
---------------
Dim PakConn As New SAConnection
PakConn.ConnectionString =
"UID=DBA;PWD=sql;DBF=\\myserver\c\pak7\mydb.db;ENG=sybaseserver"
PakConn.Open()

--->Note:
The remote server name is:myserver
Sybase(dbsrv7.exe) server name is:sybaseserver

any help or ref would be appreciated
thanks in advance


Chris Keating (Sybase iAnywhere) Posted on 2007-05-11 02:37:20.0Z
From: "Chris Keating (Sybase iAnywhere)" <keating@iAnywhere.Dot.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Connect to .db database file using vb.net
References: <4643c109.46ae.1681692777@sybase.com>
In-Reply-To: <4643c109.46ae.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vpneast-client-015.sybase.com
X-Original-NNTP-Posting-Host: vpneast-client-015.sybase.com
Message-ID: <4643d6e0$1@forums-1-dub>
Date: 10 May 2007 19:37:20 -0700
X-Trace: forums-1-dub 1178851040 10.18.242.22 (10 May 2007 19:37:20 -0700)
X-Original-Trace: 10 May 2007 19:37:20 -0700, vpneast-client-015.sybase.com
Lines: 32
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5994
Article PK: 2451

Dim PakConn As New SAConnection
PakConn.ConnectionString =
"UID=DBA;PWD=sql;ENG=sybaseserver;CommLinks=TCPIP"
PakConn.Open()


assuming that your database server is running with the database file in
the immediate network and using TCPIP.
--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

*****************************************************************************

Sign up today for your copy of the SQL Anywhere Studio 10 Developer
Edition =and try out the market-leading database for mobile, embedded
and small to medium sized business environments for free!

http://www.ianywhere.com/downloads/software/sql_anywhere_intro.html

*****************************************************************************

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use Case Express to report bugs http://case-express.sybase.com

*****************************************************************************


sri Posted on 2007-05-11 09:42:39.0Z
Sender: 5270.46443647.1804289383@sybase.com
From: sri
Newsgroups: ianywhere.public.general
Subject: Re: Connect to .db database file using vb.net
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46443a8f.5322.1681692777@sybase.com>
References: <4643d6e0$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 May 2007 02:42:39 -0700
X-Trace: forums-1-dub 1178876559 10.22.241.41 (11 May 2007 02:42:39 -0700)
X-Original-Trace: 11 May 2007 02:42:39 -0700, 10.22.241.41
Lines: 49
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5997
Article PK: 2456

thanks for the quick reply. i tried the code. now i am
getting a error:Connection error: Found server but
communication error occurred"
-2147467259
Note: there is a another application using this databse. the
connect.txt has following info:
UID=dba;PWD=***;ENG=sybaseserver;DBG=YES;LOG=Connect.Txt;LINKS=TCPIP
,NetBIOS{maxlana=10}

thanks

Dim PakConn As New SAConnection

> PakConn.ConnectionString =
> "UID=DBA;PWD=sql;ENG=sybaseserver;CommLinks=TCPIP"
> PakConn.Open()
>
>
> assuming that your database server is running with the
> database file in the immediate network and using TCPIP.
> --
>
> Chris Keating
> Sybase Adaptive Server Anywhere Professional Version 8
>
> **********************************************************
> *******************
>
> Sign up today for your copy of the SQL Anywhere Studio 10
> Developer Edition =and try out the market-leading
> database for mobile, embedded and small to medium sized
> business environments for free!
>
>
http://www.ianywhere.com/downloads/software/sql_anywhere_intro.html
>
> **********************************************************
> *******************
>
> iAnywhere Solutions http://www.iAnywhere.com
>
> ** Please only post to the newsgroup
>
> ** Whitepapers can be found at
> http://www.iAnywhere.com/developer ** EBFs can be found at
> http://downloads.sybase.com/swx/sdmain.stm ** Use Case
> Express to report bugs http://case-express.sybase.com
>
> **********************************************************
> *******************


Chris Keating (Sybase iAnywhere) Posted on 2007-05-11 11:52:20.0Z
From: "Chris Keating (Sybase iAnywhere)" <keating@iAnywhere.Dot.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Connect to .db database file using vb.net
References: <4643d6e0$1@forums-1-dub> <46443a8f.5322.1681692777@sybase.com>
In-Reply-To: <46443a8f.5322.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: keating-dm20.sybase.com
X-Original-NNTP-Posting-Host: keating-dm20.sybase.com
Message-ID: <464458f4@forums-1-dub>
Date: 11 May 2007 04:52:20 -0700
X-Trace: forums-1-dub 1178884340 10.25.99.119 (11 May 2007 04:52:20 -0700)
X-Original-Trace: 11 May 2007 04:52:20 -0700, keating-dm20.sybase.com
Lines: 27
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5998
Article PK: 2457

What version/build of ASA7 are you running? What OS? Can you add
LOG=<filespec> to the connection string for this application and post
the file that is generated when the connection attempt is made.
--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

*****************************************************************************

Sign up today for your copy of the SQL Anywhere Studio 10 Developer
Edition =and try out the market-leading database for mobile, embedded
and small to medium sized business environments for free!

http://www.ianywhere.com/downloads/software/sql_anywhere_intro.html

*****************************************************************************

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use Case Express to report bugs http://case-express.sybase.com

*****************************************************************************


sri Posted on 2007-05-12 19:30:42.0Z
Sender: 62ac.4644adfc.1804289383@sybase.com
From: sri
Newsgroups: ianywhere.public.general
Subject: Re: Connect to .db database file using vb.net
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <464615e2.8c5.1681692777@sybase.com>
References: <464458f4@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 May 2007 12:30:42 -0700
X-Trace: forums-1-dub 1178998242 10.22.241.41 (12 May 2007 12:30:42 -0700)
X-Original-Trace: 12 May 2007 12:30:42 -0700, 10.22.241.41
Lines: 45
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6000
Article PK: 2459

i am getting the error at open: the error is:
Connection error: Found server but communication error
occurred
--->
more info:
os:windos xp sp2
db server:Adaptive Server Anywhere Version 7.0.4.2788(.db)
deveop:vs studio 2005 & dotnet 2.0
connect:iAnywhere.Data.SQLAnywhere(developer ver
10)-SAConnection
--->
logfile info:
at May 12 2007 15:10:07
15:10:07 Attempting to connect using:
UID=DBA;PWD=********;ENG=sybaseserver;LOG=Connect.Txt;LINKS=TCPIP
15:10:07 Attempting to connect to a running server...
15:10:07 Trying to start TCPIP link ...

15:10:07 TCP using Winsock version 2.2
15:10:07 My IP address is xx.x.x.xx
15:10:07 My IP address is xx.x.x.x
15:10:07 TCPIP link started successfully

15:10:07 Attempting TCPIP connection (no sasrv.ini cached
address)

15:10:07 Looking for server with name sybaseserver
15:10:07 Sending broadcast to find server
15:10:07 Using broadcast address of: xx.x.x.xxx:xxxx
15:10:07 Sending broadcast to find server
15:10:07 Using broadcast address of: xxx.xxx.xxx.xxx:xxxx
15:10:07 Found database server at address xx.x.x.xxx:xxxx
15:10:07 Found database server sybaseserver on TCPIP link
15:10:07 Connected using client address xx.x.x.xxx:xxxx
15:10:07 Connected to server over TCPIP at address
xx.x.x.x:xxxx

15:10:07 Writing server address xx.x.x.x:xxxx to sasrv.ini
cache

15:10:07 Client disconnected
15:10:07 Cannot connect to server

question: does iAnywhere.Data.SQLAnywhere support .db
version 7.0.4.2788


sri Posted on 2007-05-16 14:52:12.0Z
Sender: 51f6.462a9493.1804289383@sybase.com
From: sri
Newsgroups: ianywhere.public.general
Subject: Re: Connect to .db database file using vb.net
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <464b1a9c.3264.1681692777@sybase.com>
References: <464615e2.8c5.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 16 May 2007 07:52:12 -0700
X-Trace: forums-1-dub 1179327132 10.22.241.41 (16 May 2007 07:52:12 -0700)
X-Original-Trace: 16 May 2007 07:52:12 -0700, 10.22.241.41
Lines: 47
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:6005
Article PK: 2463

I am able to connect to database using odbc connection(dsn).

> i am getting the error at open: the error is:
> Connection error: Found server but communication error
> occurred
> --->
> more info:
> os:windos xp sp2
> db server:Adaptive Server Anywhere Version
> 7.0.4.2788(.db) deveop:vs studio 2005 & dotnet 2.0
> connect:iAnywhere.Data.SQLAnywhere(developer ver
> 10)-SAConnection
> --->
> logfile info:
> at May 12 2007 15:10:07
> 15:10:07 Attempting to connect using:
> UID=DBA;PWD=********;ENG=sybaseserver;LOG=Connect.Txt
> ;LINKS=TCPIP 15:10:07 Attempting to connect to a running
> server... 15:10:07 Trying to start TCPIP link ...
>
> 15:10:07 TCP using Winsock version 2.2
> 15:10:07 My IP address is xx.x.x.xx
> 15:10:07 My IP address is xx.x.x.x
> 15:10:07 TCPIP link started successfully
>
> 15:10:07 Attempting TCPIP connection (no sasrv.ini cached
> address)
>
> 15:10:07 Looking for server with name sybaseserver
> 15:10:07 Sending broadcast to find server
> 15:10:07 Using broadcast address of: xx.x.x.xxx:xxxx
> 15:10:07 Sending broadcast to find server
> 15:10:07 Using broadcast address of: xxx.xxx.xxx.xxx:xxxx
> 15:10:07 Found database server at address xx.x.x.xxx:xxxx
> 15:10:07 Found database server sybaseserver on TCPIP link
> 15:10:07 Connected using client address xx.x.x.xxx:xxxx
> 15:10:07 Connected to server over TCPIP at address
> xx.x.x.x:xxxx
>
> 15:10:07 Writing server address xx.x.x.x:xxxx to sasrv.ini
> cache
>
> 15:10:07 Client disconnected
> 15:10:07 Cannot connect to server
>
> question: does iAnywhere.Data.SQLAnywhere support .db
> version 7.0.4.2788