-
Apr 13th, 2014, 12:01 PM
#1
Thread Starter
Fanatic Member
Localhost
Hi
I want if connection to server fails then cnn2 should become localhost
cnn2 is to connect to server
If cnn2.State Then cnn2.Close
cnn2.Open "Driver=SQL Server;Server=" & SvrName & ";Database=" & "test" & ";uid=" & Suid & ";pwd=" & Spwd & ";"
cnn2.BeginTrans
On Error GoTo errhandler
str = "Insert statement"
cnn2.Execute str
cnn2.CommitTrans
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|