Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Communication link failure.

Status
Not open for further replies.

rajeevnandanmishra

Programmer
Jun 1, 2001
379
IN
psuedocode of my program is as follows:

In visual foxpro:

BEGIN TRANSACTION
SELECT local_cursor
DO WHILE ! EOF()
EXETUTE SQL_PROCEDURE 'parameter 1','parameter 2' --to update tables in backend
IF ERROR()
ROLLBACK TRANSACTION
SHOW_ERROR_MESSAGE
RETURN
ENDIF

SKIP -- Move Record Pointer to Next Record
ENDDO

COMMIT TRANSACTION

Some time this work fine. But most of the time it gives an error message "Connectivity error: [Microsoft][ODBC SQL Server Driver]Communication link failure"

Can any one suggest me about this.
 
hi ramani,
Thankx for your reply but you replied the wrong question. You replied the question of USING MTS.

By the way, I am giving my code snippet from VFP 6.0 program

***************
=SQLEXEC(mP_handle,"Begin Tran")
SELE updCur
GO TOP
WAIT WINDOW 'Updating WIP... Please wait ' NOWAIT
DO WHILE !EOF()
** Procedure
mcom="EXEC bomexp_proc 'wip_mst','" +sectCur->section_c + "','" + updCur->product_no + "','" + ;
updCur->cusdesch_c1 + "','" + updCur->cusdesch_c2 + "','" + updCur->intdesch_c + ;
"','" + updCur->line_c + "'," + ALLT(STR(updCur->qty)) + ",&mP_login"
mP_ret=SQLEXEC(mP_handle,mcom)

IF (mP_ret <= 0)
WAIT CLEA
=AERROR(mP_err)
=SQLEXEC(mP_handle,&quot;Rollback&quot;)
DO ErrTrap && Checks Backend Error
RETU
ENDIF
SELE updCur
SKIP
ENDDO
USE IN updCur
=SQLEXEC(mP_handle,&quot;Commit Tran&quot;)
=SQLCOMMIT(mP_handle)
***********************



Now, please help me.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top