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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert statement with remote view (foxdev I am almost finished)

Status
Not open for further replies.

pomawo

Programmer
Jun 2, 2000
7
NL
Hello,<br><br>I want to place an insert statement into my remote view that is connected with a acces database.<br>The code functions but after the insert -statement&nbsp;&nbsp;get an error with the description connection factuur2 is busy<br>(error 1541). <br><br>I don't know how to solve this. Please help me.<br><br>Thanks.<br><br><br>ln_test = &quot;MAART7&quot;<br>lnhandle = sqlconnect('factuur2')<br>IF lnhandle &lt;= 0<br>*MESSAGEBOX('Kan geen verbinding maken', 16, 'SQL Connect Error')<br>ELSE<br>MESSAGEBOX('Verbinding gemaakt', 48, 'SQL Verbinding met facturerings systeem')<br>open database c:\artline_relatie\data\factuur_data<br>use remote_factuur_view<br>insert into remote_factuur_view (klantid) values(ln_test)<br>csource = SQLGETPROP(lnhandle,&quot;ConnectBusy&quot;) <br>SQLDISCONNECT(lnhandle)<br>ENDIF
 
It took me a moment, but I think I see the problem:&nbsp;&nbsp;persistent remote views (those stored in DBCs) have <i>as part of their definition</i> the connection to use.&nbsp;&nbsp;Thus, you don't need to use SQLCONNECT, because when you USE the view the connection will be established automatically. <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top