Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Cannot Connect to Database from App

Author  Topic 

holzert
Starting Member

9 Posts

Posted - 2007-09-24 : 08:53:14
Update: I got it working. I had to create an odbc connection on my machine (guess I forgot to do that this time).



I copied a SQL 2005 database from another machine (detached it first. I can connect directly in SFT SQL Server Mgmt Studio, but I cannot connect from VFP using SQLCONNECT(). I've overlooked something. My login is the db_owner and everything else. Any ideas? SQL Server is running on the same machine that I have VFP9 on. It is setup for both SQL Server and Windows Authentication and I can connect to every other database I have attached.

TIA,

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-24 : 23:23:47
What's VFP? Did you specify correct db name in SQLCONNECT().
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2007-09-25 : 10:11:25
Visual Fox Pro?

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com/SQL
Go to Top of Page

holzert
Starting Member

9 Posts

Posted - 2007-09-25 : 16:03:14
quote:
Originally posted by jackv

Visual Fox Pro?

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com/SQL




Yes
Go to Top of Page

holzert
Starting Member

9 Posts

Posted - 2007-09-25 : 16:05:11
quote:
Originally posted by rmiao

What's VFP? Did you specify correct db name in SQLCONNECT().



Visual Foxpro. This is not for distribution, I have the correct connection properties for the distributed app configured for each site. It is just in development mode. I forgot that I had created an odbc connection in windows for each site and gave the odbc connection the same name as the database so I could simply do:

? SQLCONNECT('mydatabasename')

easily whenever I need to. I created a new odbc connection with the same name as the database and it works now.

Go to Top of Page
   

- Advertisement -