0

I have installed SQL EXPRESS 2005 on Windows 7x64. I have already added sqlsvr.exe in firewall exception, enabled both Names Pipes and TCP/IP from SQL server Configuration Manager. The SQL server Browser service is also set up to run automatically. I enabled the user sa and changed the to sa using SQL Server management Studio Express.

Every thing worked fine and while tried accessing sql server from local, I am able to connect easily.

But, as I tried to create a DSN in odbc data source administration in windows XP x32bit, I am not able to connect. I tried the following names as server names

servercomputername

servercomputername\sqlexpress

192.168.1.2

192.168.1.2\sqlexpress

but all didn't worked. i.e. it shows sql server does not exists or access denied.

I even tried changing connection string in my VB6.0 source code as

Mydb.Open "Driver={SQL Server};Server=(MYSERVERNAME\SQLEXPRESS);Database=Account;Uid=sa;Pwd=sa;"

but alas, it is not working at all. I have googled and read more than 20 different posts, but no solution at all. I am expecting to find my error or my missing point in the configuration process.

Prajwal
  • 298
  • 1
  • 7
  • 18
  • "but all didn't worked" means what? Do you get any error messages? – Ocaso Protal Mar 16 '12 at 14:44
  • It shows sql server does not exists or access denied – Prajwal Mar 16 '12 at 14:47
  • 1
    I know you said you already added it to your firewall exception but you might want to turn off your firewall on both the SQL server PC and your client PC and try to connect again. – Shane Wealti Mar 16 '12 at 16:25
  • 1
    Try to enable TCP/IP protocol on EXPRESS instance. – wqw Mar 16 '12 at 17:46
  • @ShaneWealti I had tried disabling firewall on both sides – Prajwal Mar 16 '12 at 18:07
  • @wqw I have already enabled TCP/IP as well as NamedPipes from Protocols for SQLEXPRESS from SQL Server Configuration Manager – Prajwal Mar 16 '12 at 18:10
  • Try installing the SQL Native Client (10) or later on your XP box if you do not already have it and set up a new DSN using that driver and see if it works. I've had problems where using an older driver with all the same settings has problems but the newer driver can connect fine. – Shane Wealti Mar 16 '12 at 18:25
  • @ShaneWealti I already have sql native client 9.0 on my XP machine, and had tried creating Obdc from that as well. Does it really differs having sql native client 9.0 or sql native client 10 to access sql 2005 express database – Prajwal Mar 17 '12 at 01:35

1 Answers1

0

If you are using Windows 7 64-bit you must be careful to run the "correct" ODBC configuration. My guess is that you are running the 64-bit version which will never work since VB6 will only ever support the 32-bit driver.

Instead, run "c:\Windows\SysWOW64\odbcad32.exe" directly from the "SysWOW64" directory and configure.

Warren Rox
  • 655
  • 2
  • 8
  • 23