Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how can a call a vb.net procedure from vfp

Posted on 2010-08-15
5
Medium Priority
?
453 Views
Last Modified: 2012-08-13
I have a VFP program which is called from a vb.net winform

I want he vfp program to create log entries in a SQL databse

I would like to use the MS Enterprise library logging function to do this

So - how can I call a vb.net procedure frrom vfp

(I know I could just put a log entry straight to a SQL table and use a trigger to active the procedure)
0
Comment
Question by:MikeHillsi2g
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 33440639
With vb.net procedure you mean a stored prcedure?
I assume you can call a stored procedure like any stored procedure, no matter what language it's written in.


Local lnHandle, lnRetvalue
lnRevalue = 0
lnHandle = SQLStringConnect(...)

SQLExec(1,"create procedure testsqr @p1 int as return @p1*@p1")
SQLExec(1,"{?@ret = call testsqr (15)}")
? lnRetvalue && prints 225.00

Open in new window

0
 

Author Comment

by:MikeHillsi2g
ID: 33653506
I was surprised not to get any solutions to this problem
 
It turns out it is straight forward (but took many weeks to find it)
Using the Interop Forms Toolkit in VFP9  
http://weblogs.foxite.com/photos/bernardbout/images/4108/original.aspx 
0
 
LVL 30

Accepted Solution

by:
Olaf Doschke earned 2000 total points
ID: 33653550
Mike, sorry that you didn't get a better answer. But you even didn't reply to my guessing of what you meant with a procedure other than a stored procedure.

My example shows a T-SQL procedure created and then called, but that would not depend on whatever language the stored proc is or if it is a user defined or system procedure.

Bye, Olaf.

0
 

Author Closing Comment

by:MikeHillsi2g
ID: 33653574
whoops - sorry for not replying to your question
Your observation is of course correct but unfortuanly not applicable to my situation

Thanks anyway

Mike
0
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 33655958
Never mind. In regard of calling .net code also look at the .net extender: http://www.etecnologia.net/products/clrextender/clrextender-index.htm

Bye, Olaf.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question