ADO Connection with VB6 works, XE2 does not work

I am facing a strange problem in a concrete Windows 7 64 bits Home Premium SP2 machine, with other machines in the same local network all is working ok.

My tests are the following:

1.) I create an *.UDL file. I click in "Test connection" and it works, I am using the generated string to test the connection in the programs:
     Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=mypassword;Data Source=SERVIDOR\HOMEDES;

2.) Using an old VB6 program to connect to the SQL Server it works.

3.) Using a test program using XE2 it does not work, it fails in the line gcnPac.Connected := True with a message of "Connection timeout".

It does not matter because the VB6 program works, but just in case, I disabled the firewall and antivirus for a while in both the Client PC and the Server.

Code used for opening the connection is as follows:

    qcnPac: TADOConnection;

    gcnPac := TADOConnection.Create(Nil);
    gcnPac.Close;
    gcnPac.CommandTimeout := 15;
    gcnPac.ConnectionTimeout := 15;
    gcnPac.DefaultDatabase := 'mydb';
    gcnPac.Mode := cmReadWrite;
    gcnPac.LoginPrompt := False;
    gcnPac.ConnectionString := sTx;
    gcnPac.ConnectOptions := coConnectUnspecified;
    gcnPac.Connected := True;

Tested with all sorts of connection strings with the same result, pinging the SQL Server is ok, using nslookup or osql for connecting to the SQL Server also works. I can not see where is the problem, so any directions what is wrong will be appreciated.
0
pss
11/15/2013 6:35:01 PM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

0 Replies
952 Views

Similar Articles

[PageSpeed] 22

Reply:

Similar Artilces:

ADO Connection not working if Delphi and Oracle not on same computer
I had Delphi working fine with Oracle using ADO when Oracle 11g is on the same pc as Delphi. I tried to use Delphi from another pc and I do not know what to enter for "Servername" on the Build connection string screen. Originally I had tough I needed to enter the computer name, aka Hostname. I also tried entering a name of the oracle instance or Oracle service, and also tried using this info in for format of hostname.service and \\hostname-service. Can someone help -is it just the computer name, is it the ip address, does it need the Oracle instance name? Thanks. steve Hel...

This Code Works... VB6, ADO, DSNLess Connections
Hi all, This VB6/ADO code for DSNLess connections works fine when connecting to an ASE 11.9 database. I hope this is helpful to someone. Take Care, Chris p.s. Don't forget to replace the ???'s :) '/////////////////////////////////////////////////////////////////////////// ///////////////////// '/////////////////////////////////////////////////////////////////////////// ///////////////////// Private Sub Test() Set cn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") cn.Provider = "MSDASQL.1&qu...

ADO Connection Does Not Work W/ Same Parameters As DSN Connection
Folks, Could you please help me with the following code? When the program gets to the line that says: .Open userid:="myID", Password:="myPassword" I get an error message saying "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". What I can't figure out is I'm not using a data source name and what do I need a default driver for? I've already specified the driver and it's right where I said it was -- i.e., c:\dbodbc8.dll. I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My...

ADO Connection Does Not Work W/ Same Parameters As DSN Connection
Folks, Could you please help me with the following code? When the program gets to the line that says: .Open userid:="myID", Password:="myPassword" I get an error message saying "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". What I can't figure out is I'm not using a data source name and what do I need a default driver for? I've already specified the driver and it's right where I said it was. I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My references are * Micro...

ASA8 and Delphi ADO? Is it work?
Anybody test this configuration? As i can remember ASA7 don't work with Delphi via ADO. ---------------------------------- Oleg Kovalevsky Moscow, Russia I haven't tested ASA8 with Delphi, but I'm using ASA7 with Delphi 5 and ADOExpress. There are some glitches, but ASA support has been very helpful with addressing the problems. On Fri, 29 Mar 2002 17:01:05 +0300, "Oleg Kovalevsky" <okovalevsky@hotmail.com> wrote: >Anybody test this configuration? As i can remember ASA7 don't work with >Delphi via ADO. > > >----------...

Working
I have two servers running NW65sp4A (different trees). I initially installed BM3.8 patched to sp4 with VPN services ( Firewall services to follow after I know I have VPN working). My problem is that it appears to be working but its not working. I can open my Windows Explorer (from the SLAVE side network) and reach the MASTER, authenticate and open files. The MASTER NRM VPN monitor shows 1 (one) Active Connections 0 (zero) Packets Received and lots of Packets Sent. The VPN Member List Status shows both servers as �Being Configured�. The Audit Log has two recurring RED entrie...

ADO.NET connection to ASA not working
I an trying to establish my first ADO.NET connection to an ASA database. I am following the example from the iAnywhere web page called "Connecting to a SQL Anywhere Studio Database Using ADO.NET." I am getting a cast error when I try to get the DataReader. The error is "Specified cast is not valid." The code is below. Any ideas would be most appreciated! Thanks, Tim Wendt DataWeb Dynamics OleDbConnection myConnection = new OleDbConnection(@"Data Source=Travel;Provider=ASAProv.70"); //open the connection myConnection.Open(); //Crea...

ADO.NET connection not working 100% in DataWindow Designer
This may be specific to MS SQL Server but... I specified "Trusted Connection" on the "Database Profile Setup" popup but that seems to have no affect on the connection string. I tried adding "Integrated Security=SSPI" to the "Extended" box but that has no affect either. In the preview screen, I would expect to see these things to change the connection string but it does not. Testing the connection yields an authentication error. The connection works if I use a non-trusted connection but that's not really an option for me. There i...

Simpel insert query not working (xe2, ado,sql2008r2)
In an application i use: ADOQuerydatumveldwelindex.SQL.Add('insert into datumveldisindex (datum) values (:k1)'); ADOQuerydatumveldwelindex.Parameters[0].value:=system.SysUtils.Date; adoquerydatumveldwelindex.ExecSQL; In a test application everything works oke. In a production application i receive an index out of bounds exception. (on the second line of code above) It seems that array (in this case with just one element) isn't available to Delph for filling in the value. The query is connected. (conncection property is set and connections succeeds) I tried other sol...

ADO AdoDbxClient connection suddenly quit working. admin.ib issue?
I am using VS.Net 2013 to connect via Borland.Data.AdoDbxClient to interbase 7.5 databases. Working fine until yesterday. It also broke across all applications so something is messed up machine wide. I suddenly started getting the following error message upon connecting via a database open: Borland.Data.TDBXError: {"I/O error for file \"C:\\CodeGear\\InterBase/admin.ib\"\nError while trying to open file\nThe system cannot find the file specified.\r\n"} Obviously that path is wrong with a mix of slashes. Not sure where it is getting that path. Also I do not hav...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

Internet not working in browser, but connection is working
Hello all, i'm new in the linux field, but i decided to give it a try and install it. I have installed fedora 10 first, but i had the same problem, and i wasn't very happy with that version. So today i downloaded openSUSE 11.1 and after installing i noticed i have the same problem. The wire connection is active, the ping from the console is working, i have pinged the router i'm connected to and google. it's working. from the browser i am able to connect to the router interface, but i'm not able to access any webpage. i have runed a ifconfig, this is what i get : ...

ADO connection in VB6
I am trying to connect to SQL Anywhere 7.02 with the provided OLEDB provider that ships and installs from the SQL Anywhere Studio CD, but have not had any luck so far. I also have not found a good place that documents the necessary parameters to provide in the connection string. Anyone with an example that works or can point to the documentation or tech articles, that would be great. Thanks Jeff See the online help under: ASA User's Guide PART 1. Starting and Connecting to Your Database CHAPTER 2. Connecting to a Database Here is a sample: ' Decl...

ado begintrans does not work
I am having issues with ADO begintrans method on the connection object. It gives the following error: Access Violation. Note: Transaction statements on session object in OLE DB work fine with no problem. Is anyone aware of any issues with ADO transactions? Thanks. Iraj. Can you provide a sample for this. This code snippet works as we expect it. Dim objADO As ADODB.Connection Dim objCMD As ADODB.Command objADO = New ADODB.Connection() objADO.ConnectionString = "'Provider=asaprov.80;user id=dba;dsn=ASA 8.0 Sample;" objADO.Open() 'objADO.Execute("C...

Web resources about - ADO Connection with VB6 works, XE2 does not work - embarcadero.delphi.ado

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
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

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

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

Paris attacks: Belgium connection probed as terrorist past of Brussels district of Molenbeek under spotlight ...
Prosecutors reveal a growing Belgian connection to the deadly Paris attacks, focusing on a poor Brussels district.

Half of data connections by top 500 Android apps are 'covert' with no effect on user experience
Researchers at the Massachusetts Institute of Technology have discovered that half of the communications connections established by the top free ...

Don’t Let Great Content Fall on Deaf Ears: Know your Connection Strategy
... via employee newsletter when it should have come through small-group manager meetings All of these and more are the result of a faulty connection ...

Brussels Connection Under Spotlight After Paris Killings
(EurActiv) — Prosecutors on Sunday disclosed a growing Belgian connection to the Paris attacks as Premier Charles Michel conceded that a Brussels ...

Be Goofy, Smile At Your Baby: Protection Begins with Connection, Pediatrician Says
VideoPart 3 of a series Andrew Garner wears silly ties and finds it easy to make a goofy face. These are valuable tools for charming the babies ...

Get ready for live-streamed extreme sports: Seattle startup Sioeye adds 4G connection to action cam
The history of people doing crazy stunts on camera is full of notable achievements. Motorcycle daredevil Evel Knievel jumped over whatever he ...

Resources last updated: 11/26/2015 5:03:25 AM