create dll using vb.net and how to call it from sql server

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 18
Reputation: deepukng is an unknown quantity at this point 
Solved Threads: 0
deepukng deepukng is offline Offline
Newbie Poster

Re: create dll using vb.net and how to call it from sql server

 
0
  #11
Dec 2nd, 2008
thank you for the information. Yes i am working in VB.net. when i was not able to register a dll created with vb.net i tried VB 6.0. Now VB6 dll is working fine. i am calling this dll using a trigger which is for INSERT record. But when my application inserts a record to the table, Trigger runs succefully but record is not inserted and gives this Error:
Description: Receipt. Database error (operation=INSERT, error=0). [Microsoft][SQL Native Client]Connection is busy with results for another command Please refer this error to your database administrator or see your database documentation for further assistance.
Source: 12:27:08

so i want to try , call a VB script from sql. if it possible and if u know about this, pls tell me how can i proceed.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 9
Reputation: CornerAnalyst is an unknown quantity at this point 
Solved Threads: 1
CornerAnalyst CornerAnalyst is offline Offline
Newbie Poster

Re: create dll using vb.net and how to call it from sql server

 
0
  #12
Dec 2nd, 2008
You will also need to give the user in SQL Server "special" permission to run external DLL's. See the documentation for sp_oacreate.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: create dll using vb.net and how to call it from sql server

 
0
  #13
Dec 2nd, 2008
You may want to check permissions like CornerAnalyst suggested. However, I think you would get a different error message if it were permissions.

Here's another MS TechNet forum thread. It's for VB.NET but I think the points in that thread can apply to VB6 too. The two points that might cause that error are inserting a null value to a "not null"-field and explicitly disposing data-adapter commands. So in the case of VB6 the issue may come from any previous command (or command object to be more precise).

Also, the SQLProfiler was mentioned. It might be worth to try to see what actually happens.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 9
Reputation: CornerAnalyst is an unknown quantity at this point 
Solved Threads: 1
CornerAnalyst CornerAnalyst is offline Offline
Newbie Poster

Re: create dll using vb.net and how to call it from sql server

 
0
  #14
Dec 2nd, 2008
Teme64 already showed you how to create a class in vb.Net, compile the code to a DLL, and register it.

If you are using VS just go to the BUILD menu item and it will be done for you automatically.

What problem are you having with Teme65's instructions?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC