Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a hardware that I can control using its device driver.Driver is a simple dll and I read and write to this device using a VC# program successfully(VS2010).

Now,the architecture of program forces me to read/write to this device every time a user updates some tables in a database or calls some stored procedure in this database using other applications.So it seems I need to have put read/write function to this device inside the code(triggers/stored procedures) of database.

I have 2 choices to extend SQLServer engine for this purpose,Extended stored procedure and CLR.But ther former is deprecated and Microsoft doesn't support it anymore and the latter doesn't let me add reference to hardware driver(third party dll) in my CLR project in Visual Studio 2010(VC# CLR project type for SQL Server).

Any idea to load an assembly (dll)in SQL Server and use its functions?Please notice that I need read/write from/to device in database code(triggers/stored procedure) directly so I can not use other solutions like running a service on database server to deal with device.

Thanks in advance
Posted
Updated 29-Nov-14 17:33pm
v2
Comments
OriginalGriff 30-Nov-14 2:11am    
Don't bump your question. It's rude and doesn't help you get an answer - in fact quite the reverse, as it implies you think you are far more important than anybody else here and can annoy people.
Add useful information by all means, but just editing it top bring it back to the top of the list is not a good idea.
rezaasaadi 30-Nov-14 7:27am    
I don't know what you're trying to say.I only changed a word in title of this question so it gets more meaningful("hardware" changed to "device").If updating title brings a question up,it's not my fault."Code project" allows me to update my questions and I used this feature.I'm sorry if my update made any inconvenience for people,but at least I didn't judge others

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900