DSN Less Connection using ADO in VB to SQLAny 5.x

Is their a way to create a DSNLess connection to SQL Anywhere 5.x on an NT
4.0 Server using ADO 2.x and VB 6.0?

I can do this with MS SQL Server with no problems.


0
Trey
8/23/2000 9:55:16 PM
sybase.sqlanywhere.general 32637 articles. 4 followers. Follow

8 Replies
388 Views

Similar Articles

[PageSpeed] 51

I can do this through PowerBuilder so you should be able to do it through 
your tool.  I don't do VB so I can't give you an example.  In your 
connection string you'll have to indicate the name of the driver, "Sybase 
SQL Anywhere 5.0", startup parameters, and the location of the database 
file.
-- 
Jim Egan [TeamSybase]
Houston, TX
http://www.eganomics.com

Sybase Developers Network
http://sdn.sybase.com/sdn/mec/mec_home.stm
0
Jim
8/24/2000 1:49:48 AM
Could you give me a connection string example?  It should be the same for
VB.


Jim Egan <dbaguru@eganomics.com> wrote in message
news:MPG.140e3966cba0409798acff@199.93.177.77...
> I can do this through PowerBuilder so you should be able to do it through
> your tool.  I don't do VB so I can't give you an example.  In your
> connection string you'll have to indicate the name of the driver, "Sybase
> SQL Anywhere 5.0", startup parameters, and the location of the database
> file.
> --
> Jim Egan [TeamSybase]
> Houston, TX
> http://www.eganomics.com
>
> Sybase Developers Network
> http://sdn.sybase.com/sdn/mec/mec_home.stm


0
Trey
8/24/2000 3:20:00 PM
This is what I have used in PowerBuilder:
SQLCA.DBPARM = "ConnectString='Driver=Sybase SQL Anywhere 
5.0;UID=dba;PWD=sql;Start=d:\sqlany50\win32\dbeng50.exe;DatabaseFile=F:\D
BASE\BOOK_LIB\Book_lib.db'"
-- 
Jim Egan [TeamSybase]
Houston, TX
http://www.eganomics.com

Sybase Developers Network
http://sdn.sybase.com/sdn/mec/mec_home.stm
0
Jim
8/25/2000 2:57:38 AM
This looks good for starting a stand alone DB.

Can you replace DBEng50.EXE with dbclient.exe in order to connect to a
remote/network Server DB running as an NT Service?

Can you add command line switches (eg: -x
TCPIP{HOST=xxx.xxx.xxx.xxx} -ga -Q) to the connection string?

I'll do some experimenting.   Please post a response if you don't see mine
already.





Jim Egan <dbaguru@eganomics.com> wrote in message
news:MPG.140f9c9d381de70898ad0b@199.93.177.77...
> This is what I have used in PowerBuilder:
> SQLCA.DBPARM = "ConnectString='Driver=Sybase SQL Anywhere
> 5.0;UID=dba;PWD=sql;Start=d:\sqlany50\win32\dbeng50.exe;DatabaseFile=F:\D
> BASE\BOOK_LIB\Book_lib.db'"
> --
> Jim Egan [TeamSybase]
> Houston, TX
> http://www.eganomics.com
>
> Sybase Developers Network
> http://sdn.sybase.com/sdn/mec/mec_home.stm


0
Trey
8/25/2000 2:45:50 PM
Yes, you can replace starting the engine with starting the network 
client.  The options you suggested should work just fine.
-- 
Jim Egan [TeamSybase]
Houston, TX
http://www.eganomics.com

Sybase Developers Network
http://sdn.sybase.com/sdn/mec/mec_home.stm
0
Jim
8/26/2000 3:15:40 AM
What are the required parameters if you don't run dbclient, i.e. ASA 6.0?


0
Tom
8/28/2000 12:29:14 PM
Drop the START parameter and add a LINKS parameter.  (I think)
-- 
Jim Egan [TeamSybase]
Houston, TX
http://www.eganomics.com

Sybase Developers Network
http://sdn.sybase.com/sdn/mec/mec_home.stm
0
Jim
8/28/2000 8:21:09 PM
I finally connected to a SQLAv5.x DB, running as a service on NT, in VBv6
using ADO.  Here is sample code to connect.


    Dim cnn            As New ADODB.Connection
    Dim strConn     As String

    strConn ="Provider=MSDASQL.1;DRIVER=Sybase SQL Anywhere 5.0;"
    strConn = strConn & "UID=dba;PWD=sql;"
    strConn = strConn & "Start=c:\sqlany50\win32\dbclient.exe -x
TCPIP{HOST=xxx.xxx.xxx.xxx} -ga ServerName"

   cnnFTIS.Open strConn

You might want to experiment with other options within the connection
string.   The above worked fine for me.  Below are samples that failed, but
might give you ideas on how to build your own connection strings.

   strConn = "Provider=MSDASQL.1;DRIVER=Sybase SQL Anywhere 5.0; _
                    SERVER=IBITEST;DATABASE=FTISDATA;UID=dba;PWD=sql"

   strConn = "Provider=MSDASQL.1;DRIVER=Sybase SQL Anywhere 5.0; _

SERVER=IBITEST;DATABASE=\\INDVSRVA\FTIS\DATA\FTISDATA.DB;UID=dba;PWD=sql"

   strConn = "Provider=MSDASQL.1;DRIVER=Sybase SQL Anywhere
5.0;UID=dba;PWD=ftispass; _
                    Start='c:\sqlany50\win32\dbclient.exe -x
TCPIP{HOST=xxx.xxx.xxx.xxx} -ga'; _
                    DatabaseFile=\\INDVSRVA\INFOSTOR\FTIS\DATA\FTISDATA.DB"

   strConn = "Provider=MSDASQL.1;DRIVER=Sybase SQL Anywhere
5.0;UID=dba;PWD=sql; _
                    Start=c:\sqlany50\win32\dbclient.exe -x
TCPIP{HOST=xxx.xxx.xxx.xxx} -ga ServerName; _
                    DatabaseFile=\\INDVSRVA\INFOSTOR\FTIS\DATA\FTISDATA.DB"


Hope this Helps.



Jim Egan <dbaguru@eganomics.com> wrote in message
news:MPG.1410e769e50c817698ad1d@199.93.177.77...
> Yes, you can replace starting the engine with starting the network
> client.  The options you suggested should work just fine.
> --
> Jim Egan [TeamSybase]
> Houston, TX
> http://www.eganomics.com
>
> Sybase Developers Network
> http://sdn.sybase.com/sdn/mec/mec_home.stm


0
Trey
8/30/2000 7:12:35 PM
Reply:

Similar Artilces:

FYI
This should work with other versions of SQLA or ASA. Where there is more than one database being handled by one Service SQLAPROD service manages CustomerDB and InvoicesDB....etc) you WILL need to user the DATABASE option within the Connection String. If you do not, it will default database of the Service will be the first database the Service opened (CustomerDB in this case). Here is an updated connection string example (it works) This connects to the first loaded database......in this case it will be CustomerDB: strConn = "Provider=MSDASQL.1;DRIVER=Sybase SQL Any...

DSN-less connection to SQL Anywhere 5.0 from VB 6.0
I am trying to connect to SQL Anywhere database using ADO in VB 6.0, but without using a specific DSN. I have gotten it to work using a DSN, but am trying to provide everything the connection will need without using the DSN, as not all the computers this will run on will have the DSN. Currently running this code to make connection to SQL Anywhere database using DSN: Public adocnn As New ADODB.Connection Sub Main() Dim adoRecordset As ADODB.Recordset Dim strCnn As String Dim adoCmd As ADODB.Command Set adoCmd = CreateObject("adodb.command") Set...

How to connect DBClient using a DSN-less connection in a VB5 App
I have a VB5 app connecting to SLQ Anywhere without a data source name - no problem. I am changing the app to a multi-user environment using SLQ Anywhere Server & SQL Anywhere Client. I can connect with a DSN - no problem; the ODBC dialog screen comes up. I don't want to setup a DSN on all the machines in the office if I don't have to. We are running Novell (I think 3.1, maybe 4.0) Here is the code for the standalone version DSN-less- works fine. RDOConnect = "UID=rico;PWD=rico;DBF=" + DBPath + "\ricoapp.DB;DRIVER=Sybase SQL Anywhere 5.0;DSN=&#...

How do I connect to SAW 5.5 with VB.NET/ADO.NET?
I want to connect to a SQL Anywhere 5.5 database running on a W2K Pro server, using VB.NET and ADO.NET. Here's how I connect to MS SQL Server with VB.NET and ADO.NET: gstrADOConnectionString = "Data Source=" & gstrServerName & ";" & _ "Initial Catalog=" & gstrDatabase & ";" & "Integrated Security=SSPI;" & _ "Connect Timeout=" & Convert.ToString(gshoADOConnectTimeout) Example: Data Source=PSI_Dell;Initial Catalog=BRM;Integrated Security=SSPI;Connect Timeout=60 Here's how I did it...

VB dsn-less connection?
How to make a Visual basic dsn-less connection to ASE 12? Here are the parameters. user id = myid user pw = mypw database = db1 server = SYBSERVER1 networkaddress = SYBSERVER1.XXXX.com,3400 IP Addr = 111.111.11.111 Thanks If you create a DSN and look it up in the registry you will have the attribute names for these particular attributes. Then when you create the conencitons string: ConnString = {Driver=Sybase ASE ODBC Driver;UserID=myid;Password=mypw;Database=db1;etc.... Since you show networkaddress I can tell you are using ODBC 12.5 - tds based. That attribute ...

Deploying ASA6 and using DSN-less connections...
Hi, After much research and trial and error, I have come up with a method of easily deploying ASA6 with my PowerBuilder 5 application (I would imagine all would still work with higher versions as well) and also of connecting to my ASA database without creating an ODBC Data Source (DSN). I noticed that this topic is asked about frequently, but I was unable to find a simple solution so I'd lke to contribute this one. I have tested this method on my Windows 95, 98 and 2000 environments, with complete success. If you have any comments about my method, please pass them along. ...

ODBC-less Connection from VB 5.0
I have a large VB 5 app running SQLAnywhere 5.5.0.4 on Novell 4.1. We currently connect through a Data Source Name. I would love to not have to configure ODBC at the work station (50 + Servers, 500 workstations in a spread out network). I tried this connect string to no avail. sCnct = "driver={Sybase SQL Anywhere 5.0};server=" & sDBName & ";database=" & sDBName & ";UID=" & sUser & ";PWD=" & sPass & ";dsn='';" Set m_En = rdoEnvironments(0) Set m_cn = m_En.OpenConnection(dsName :=&qu...

How can I connect to an ASA6 DSN using ADO?
As sbj Here is a sample: <HTML> <HEAD> <TITLE>ADO Example</TITLE> </HEAD> <BODY> <% Set MyConn=Server.CreateObject("ADODB.Connection") MyConn.Open "DSN=asademo" Set RS=MyConn.Execute("SELECT * FROM Department") %> <table border=1> <tr> <% for i=0 to RS.Fields.Count -1 %> <TH> <%= RS(i).Name %> </TH> <% Next %> </TR> <% WHILE NOT RS.EOF %> <TR> <% for i=0 to RS.Fields.Count -1 %> <TD> <%= RS(i) %> </TD> <%...

DSN Less connection using sql anywhere
Hi We have recently shifted our web pages and asp pages onto SBC webhosting. The problem is that we are using SQl Anywhere 5.5 database on our database server. Our various locations are accessing asp pages using SQL anywhere database. I have to setup ODBC connection to SBC site . Currently we are using the following script in asp pages: Set conn = Server.CreateObject("ADODB.Connection") conn.Open "DSN=WestSac;UID=DBA" Set cmd = Server.CreateObject("ADODB.Command") Could anyone help me how to setup DSN less connection using SQl anywhere. Thanks N...

How can I connect to an ASA6 DSN using ADO?
As sbj ...

Can I use DSN less to connect database
Hi, Can I use DSN less to connect database, like connect to *.mdb? from LEO ...

Deploying ASA6 and using DSN-less connections... #2
Hi, After much research and trial and error, I have come up with a method of easily deploying ASA6 with my PowerBuilder 5 application (I would imagine all would still work with higher versions as well) and also of connecting to my ASA database without creating an ODBC Data Source (DSN). I noticed that this topic is asked about frequently, but I was unable to find a simple solution so I'd lke to contribute this one. I have tested this method on my Windows 95, 98 and 2000 environments, with complete success. If you have any comments about my method, please pass them along. ...

Connecting to ASA 6 using 5.x DataSource
I can't seem to connect to an ASA 6 database server using the DataSources I created for connecting to SQLAnywhere 5.5. I have changed the client startup to dbcli6.exe with no success. If anyone has some info on how to make the connection I would really appreciate it. Greg My 'old' setup was: Database server (dbsrv50) = SQLAnywhere 5.5.05 build 2509 starting as a service on a NT 4.0 machine or just starting using the following command for a Win9x machine. START /MIN c:\sqlany50\win32\dbsrv50.exe -n uuserver -c 20M -ti 0 -x tcpip d:\unitedu\monson_01\uu_monson_01.db...

DSN less connection using Web.config file
Hi I have added name value pair for connection string in the Web.config file as shown below. <appSettings> <add key="EventCM_Database" value="Provier=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=E:\web\keydynamics\htdocs\_database\db.mdb" /> </appSettings> On my local environment if works file when the file is located within c:\Inetpub\wwwroot\Applicationname\ directory I attempt to access the database in the following manner and it works on my local environment. Dim dbConnection As System.Data.IDbConnection = N...

How to make a DSN-less connection using TSQLConnection in XE2
I'm sorry if this is off-topic. I'm actually trying to use DbExpress TSQLConnection to make a dsn-less connection via Odbc to various databases but mostly to Sybase SQL Anywhere 11 or 12. I couldn't see any other forum specifically for DbExpress. It's taken me a long time to get round to converting from Delphi 2007 to XE2 Enterprise, which I bought some time ago. I was using OdbcExpress before in d2007, but that is now obsolete and I thought I'd switch to DbExpress. However, I am quite disappointed with the way DbExpress is setup, as it seems to lean heavily on an INI fi...

SQLAnywhere 5.0 with VB 6 ADO via ODBC
How do I properly connect a VB6 application to a SQLAnywhere db via ODBC? I'm trying to connect my own program to our companies database to get some data out. The ODBC connection called KSRTEST works fine as our standard software already uses it. However, if I run my program I get the following error message: Error -2147217843(80040e4d) [Sybase][ODBC Driver]Watcom SQL rejected connection: invalid parameter Here is the code: -------------------------------------------------------- Dim KSRDaten As Adodc Private WithEvents adoCn As ADODB.Connection Private WithEvents adoRs ...

Anybody using SQLAnywhere 6.x and Netware 5.1?
We have just upgraded our server to Netware for small business 5.1 and are getting multiple abends when we run our applications against sql anywhere databases. I have upgraded the server and clients to 6.0.4, but we still are getting the abends. We were using ipx, so switched to tcp/ip, but that didn't help either. We don't get any errors from within the app or any assertion error, the server just goes into multiple abends and freezes. We didn't have any problems with these two apps running on netware 4.11. Any suggestions most welcome. At this point I would recomme...

DSN-less, register-less connection?
I have the DSN-less connection ok with the following: SQLCA.DBParm = "ConnectString='Driver=Adaptive Server Anywhere 7.0;" + & "UID=dba;PWD=sql;DBF=c:\mydir\mydb.db;" + & "Start=c:\mydir\rteng7.exe -c 8m'" But as far as I know the 'Driver=Adaptive Server Anywhere 7.0;' requires a register setting, or does it? Can I get around this somehow so I don't need any register settings for a connection? "Doogie" <doogie@anywhere.com> wrote in message news:OWG942%23NDHA.364@forums-2-dub... > I have the DSN-...

ODBC DSN less connection issues using ASE ODBC Driver
Hi, I am facing a problem while making dsn less connection to sybase Here is the thing, I shall try to make it simple: this piece of connection string works fine in production with sybase 11 open client installed Driver={SYBASE SYSTEM 11};Srvr=SYBPRD_DEV;Uid=SYBPRDCOM;Pwd=welcomedb1; However, I am trying to setup a Dev environment with Sybase open client 12.5 ..this piece fails with the following error msgs, Connection string: err msg: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (i tried changing it to {SYBASE ASE ODBC Drive...

Connect to ASE 12.5.3 using ADO.Net from Visual Studio 2005?
Hello all, Is there a driver available that will enable me to connect from a VS 2005 application to a Sybase ASE 12.5.3 database located on a unix server on our network? Up until now, I have been trying to do so using OLEDB, but I would imagine that ADO.Net should be faster. Any advice would be much appreciated --- I am hoping that the driver is free and is available directly from Sybase. Regards, Kevin Software Developer Kit (http://downloads.sybase.com/swd/base.do? client=support) Hi, I have exactly the same question. But it seems no one provides any answer yet. Something...

Powerbuilder 6.5.1 connecting to SQL Server 2000 using ODBC Dsn
Can anyone help in connecting by Powerbuilder 6.5.1 application talking to sql 2000 database. Our applications has a ini file which includes the following details [Database] DBMS=MSS Microsoft SQL Server 6.x ServerName=TestServer AutoCommit=true Database=pubs Lock=RL In case of ODBC dsn, what should go in ini other than these. Please suggest [Database] DBMS=ODBC AutoCommit=true Database=pubs Lock=RL In powerbuilder the profile is created using odbc dsn as the datasource The connection is successful in Powerbuilder IDE. But when I launch the application, I ge...

MySQL 5.x and ASP.NET ADO 2.0 framework connection issues....
I have tried every way possible to connect to the database with every example on the web and have no luck.  I now have 9 projects in VS that cannot connect after trying to tweak each one. Even temping was purchasing the "Professional ADO.NET 2.0" book, but all the poor reviews has me wondering if the samples, which other readers say they cannot download, even work? What I wish to do is use the 2.0 framework in VB.NET to create an ASP.NET page, pull data from a stored procedure, function, hard coded SQL - ANY connection to the DB will do.  I can make the procs on...

Powerbuilder 6.5.1 connecting to SQL Server 2000 using ODBC Dsn
Can anyone help in connecting by Powerbuilder 6.5.1 application talking to sql 2000 database. Our applications has a ini file which includes the following details [Database] DBMS=MSS Microsoft SQL Server 6.x ServerName=TestServer AutoCommit=true Database=pubs Lock=RL In case of ODBC dsn, what should go in ini other than these. Please suggest [Database] DBMS=ODBC AutoCommit=true Database=pubs Lock=RL In powerbuilder the profile is created using odbc dsn as the datasource The connection is successful in Powerbuilder IDE. But when I launch the application, I get ...

Help Please
We're attempting to include a VB Active X control in a PB 6.5 application. We've included the necessary dll's along with it. When running the application in both development mode and as an executeable, we open the application, open the window that the control is on (without "touching" the control), exit PowerBuilder, and our application gpf's. If running in development mode, PB gpfs when we attempt to restart it. If we don't go into the window where the Active X control is located, everything works fine. The gpf we're getting appears to be a VB dll, ...

Web resources about - DSN Less Connection using ADO in VB to SQLAny 5.x - sybase.sqlanywhere.general

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

Alec Baldwin, Tommy Hilfiger and a Designer With a ‘Downton’ Connection
It was something of a British invasion at Michael’s today with plenty of posh folks (Majesty magazine EIC Ingrid Seward , the always dashing ...

Quantum Break requires Internet connection for streaming cut scenes on PC
Marshall Allman appears in the full-motion episodes, but not in the actual game. The idea of requiring an Internet connection for single-player ...

4G Connections Hit One Billion as Mobile Broadband Momentum Extends to the Developing World
The number of 4G mobile connections worldwide has surpassed the one billion mark and is on track to account for a third of all mobile connections ...

Deadpool Really Did Have A Major Connection To Marvel And The Avengers, Here's How
The Deadpool movie was full of a ton of Marvel related easter eggs, literally more than we could count. Most of them were obvious, a few were ...

Zika virus-microcephaly connection hunted in Brazil - CNN.com
Is the Zika virus linked to microcephaly? The CDC and Brazilian health officials are leading the first-ever large scale investigation to find ...

Smart city tech shows complex connections between data and sensors
... MWC, Parkeon and Sierra Wireless announced that Sierra Wireless AirPrime HL Series embedded modules will be used to enable cellular connections ...

Van Jones And Jeffrey Lord Nearly End Up In A Fist Fight Over Trump's KKK Connections
CNN needs to fire Jeffrey Lord if they want to keep the name "News" in their name. His performance with Van Jones tonight was shameful. Utterly ...

Resources last updated: 3/4/2016 12:16:14 PM