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 file and DSN's being present. But leaving aside that generally depressive response, I still want to make this work. It's not working dsn-less for me because no matter what settings I
 have tried so far, it always comes back and says DSN .... not found.

I have all the correct connection parameters that work outside of Delphi and I've looked at the Params.Strings that get filled in when the driver name ASA is selected, for example. It seems to take the param "Database" as meaning a DSN name and nothing can persuade it otherwise. Leaving it blank results in it looking for a DSN called DBNAME. 

The parameters that are setup when driver name "Odbc" is selected I find somewhat baffling as well, even more so, as there doesn't appear to be anywhere to specify even a DSN name. On clicking the little x beside Driver Name in the properties for a TSQLConnection with driver Odbc, an access violation appears saying "unable to expand..."

If anyone else has cracked how to do a DSN-less ODBC connection with DbExpress at runtime, I would be eternally grateful to learn how to go about it. 

Thanks, cheers,
Steve

www.objecttree.com (London)
0
Steve
10/8/2014 6:04:02 PM
embarcadero.datasnap 643 articles. 1 followers. Follow

0 Replies
468 Views

Similar Articles

[PageSpeed] 45

Reply:

Similar Artilces:

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=&#...

Problem using DSN-less connection to Sybase (using ASP)
My connection works if I connect using the DSN, the connection string being: "DSN=SybaseAdminDev;username=sa;password=intershop" but if I try using a DSN-less connection string: "Driver={Sybase System 11}; Server=ISSERVER; Database=sybsystemprocs; UID=sa; PWD=intershop" I get the error: --------------------------------------------- Microsoft OLE DB Provider for ODBC Drivers error '80004005' [INTERSOLV][ODBC SQL Server driver]Insufficient information to connect to the data source. /sybasetest/getDBsizes.asp, line 13 --------------------------...

Making this sentence into DSN Less connection
How do I transform this into a dns less connection in powerbuilder 7.0.3 ? SQLCA.DBMS = "ODBC" SQLCA.AutoCommit = False SQLCA.DBParm = "ConnectString='DSN=MyDatabase;UID=dba;PWD=sql'" Thanks Carlos Rosario - Argentina A DSNless connection doesn't include the 'DSN=MyDatabase' and does include 'Driver=<somedriver>' and additional info. That information is in your current DSN, which you didn't post, so I can't tell you what to include. On 19 May 2005 08:38:43 -0700, in sybase.public.powerbuilder.connectivity Ca...

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

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

how i make dsn less connection in powerbuilder 8
I want to connect database without dsn how can i do that, please send code for that A quick google search yielded: http://www-gatago.com/comp/soft-sys/powerbuilder/2432684.html Simply change the Driver= value to match the ODBC driver you want to use. pravin wrote: > I want to connect database without dsn how can i do that, > please send code for that -- Chris Keating Sybase Adaptive Server Anywhere Professional Version 8 ***************************************************************************** Sign up today for your copy of the SQL Anywhere Studio 9 ...

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

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

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

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

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

Problem connecting with DNS-less connection string (using ASP)
My connection works if I connect using the DSN, the connection string being: "DSN=SybaseAdminDev;username=sa;password=intershop" but if I try using a DSN-less connection string: "Driver={Sybase System 11}; Server=ISSERVER; Database=sybsystemprocs; UID=sa; PWD=intershop" I get the error: --------------------------------------------- Microsoft OLE DB Provider for ODBC Drivers error '80004005' [INTERSOLV][ODBC SQL Server driver]Insufficient information to connect to the data source. /sybasetest/getDBsizes.asp, line 13 --------------------------...

DSN-less connection
Can anyone supply me with the proper syntax for a connect string for SQLAnywhere version 5.5? I'd be greatly appreciative. Thanks John der Kinderen sConnectString="Provider=MSDASQL;Driver=Sybase SQL Anywhere 5.0;DataBaseFile=c:\MyDir\MyDb.db;UID=dba;PWD=sql" works for me ! <johndk> wrote in message news:C4C1941FE452A39600567CB085256C67.00567CCB85256C67@webforums... > Can anyone supply me with the proper syntax for a connect string for > SQLAnywhere version 5.5? I'd be greatly appreciative. > > Thanks > John der Kinderen Thank...

Web resources about - How to make a DSN-less connection using TSQLConnection in XE2 - embarcadero.datasnap

FireMonkey Q&A
Questions and answers from a FireMonkey webinar

Resources last updated: 11/26/2015 6:13:55 AM