troubleshooting Question

vfp9 sql remote connection

Avatar of b001
b001Flag for Afghanistan asked on
FoxProMicrosoft SQL Server
2 Comments1 Solution1923 ViewsLast Modified:
HI Experts
I am using the following connection string from fvp9 to connect to a remote sql database.

FMS_SERVERIP= '235,256,258,99' my remote sql server ip
      lcStr = "Driver={SQL SERVER};Server=&FMS_SERVERIP;Database=Group;UID=b001;pwd=b00158;Trusted_Connection=no;"
 try
      lnHandle = Sqlstringconnect(lcStr)
      lnResult = SQLExec(lnHandle, "SELECT * FROM message ", "cOutData1")

CATCH
        wait window 'no sql connection'
ENDTRY

it works fine but if I lost the internet connection it does not goto my catch option  instead it comes back with Microsoft SQL Server Login connction failed error
when I click ok it pops up another screen and gives me the oprion to change login id and password then try to connect again.

What I would  like to happend when the connection fails is to goto  catch option ,  wait window 'no sql connection'
Please help
Thanks
ASKER CERTIFIED SOLUTION
Olaf Doschke
Software Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros