Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Calling external dll in SQL

Author  Topic 

kpayne
Starting Member

1 Post

Posted - 2004-01-16 : 11:16:29
We are trying to move our reporting to crystal but we need to perform unit of measure convertions on the data before it is reported. These unit of measures convertions are currently in a dll that gets called in the VB program which puts out the report. I was told that crystal can not use external dll's and that maybe SQL could use the dll to convert the data before it goes out to crystal. Am I on the right track with this? How can I do this in SQL?

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2004-01-16 : 12:07:44
SQL Server does allow you to make calls to COM DLL's, yes, but not Win32 DLL's or .NET assemblies. It's not generally recommended practice. You should give serious thought to converting the application code to T-SQL and run the conversions natively within SQL Server. I would be interested to see what calculations are being performed; I suspect the T-SQL conversion would be trivial if the DLL is simply compiled VB.

Read up on sp_OACreate in BOL to get a sense of what would be required, if you do elect to use the DLL.

Jonathan
Gaming will never be the same
Go to Top of Page

mfemenel
Professor Frink

1421 Posts

Posted - 2004-01-16 : 12:44:59
This article also gives some insight and example into using .dll's from sql server. Feel free to post back here with any questions.

Mike
"oh, that monkey is going to pay"
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-01-16 : 14:05:01
it is also probably very trivial to re-write these formulas in Crystal as well. Crystal reports has excellent formula support, with good flow-control and conditional constructs and loops and local variables and all that. (at least versions >=7.0 do)


- Jeff
Go to Top of Page
   

- Advertisement -