Showing posts with label dlls. Show all posts
Showing posts with label dlls. Show all posts

Monday, March 26, 2012

External SQL functions exported by DLLs

We have a few rather advanced calculation routines
developed in C++. Currently we are using a Sybase ASA
database for our app. and these routines are accessible
by so called external functions exported by a DLL
(dynamic link library) that we wrote in C++. Sybase
supports this quite nicely.
The client app can call such routines by:
"select get_roof_angle() as angle from dummy;"
or
":angle = call get_roof_angle();"
Now we are checking if other databases can provide us
with similar abilities. So I just wonder if SQLServer/MSDE
supports the ability to call a routine exported by a
DLL? If yes, does anyone know the SQL syntax to declare
it in SQLServer/MSDE
Best regards
Peter Sullvan
hi Peter,
Peter Sullvan wrote:
> We have a few rather advanced calculation routines
> developed in C++. Currently we are using a Sybase ASA
> database for our app. and these routines are accessible
> by so called external functions exported by a DLL
> (dynamic link library) that we wrote in C++. Sybase
> supports this quite nicely.
> The client app can call such routines by:
> "select get_roof_angle() as angle from dummy;"
> or
> ":angle = call get_roof_angle();"
> Now we are checking if other databases can provide us
> with similar abilities. So I just wonder if SQLServer/MSDE
> supports the ability to call a routine exported by a
> DLL? If yes, does anyone know the SQL syntax to declare
> it in SQLServer/MSDE
> Best regards
> Peter Sullvan
you can write so called "extended stored procedures" externded by dll... at
http://www.sqldev.net/xp.htm you can find some examples as long as usefull
links..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

External SQL functions exported by DLLs

We have a few rather advanced calculation routines
developed in C++. Currently we are using a Sybase ASA
database for our app. and these routines are accessible
by so called external functions exported by a DLL
(dynamic link library) that we wrote in C++. Sybase
supports this quite nicely.
The client app can call such routines by:
"select get_roof_angle() as angle from dummy;"
or
":angle = call get_roof_angle();"
Now we are checking if other databases can provide us
with similar abilities. So I just wonder if MS-SQLServer
supports the ability to call a routine exported by a
DLL? If yes, does anyone know the SQL syntax to declare
it in MS-SQLServer.
Best regards
Peter SullvanCurrently only as (extended) stored procedures.
EXEC xp_procname -- which really is a function in a DLL file.
SQL Server 2005 will implement CLR inside SQL Server.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Peter Sullvan" <ps@.NOSPAMonline.de> wrote in message
news:%23Usr70jJFHA.3960@.TK2MSFTNGP09.phx.gbl...
> We have a few rather advanced calculation routines
> developed in C++. Currently we are using a Sybase ASA
> database for our app. and these routines are accessible
> by so called external functions exported by a DLL
> (dynamic link library) that we wrote in C++. Sybase
> supports this quite nicely.
> The client app can call such routines by:
> "select get_roof_angle() as angle from dummy;"
> or
> ":angle = call get_roof_angle();"
> Now we are checking if other databases can provide us
> with similar abilities. So I just wonder if MS-SQLServer
> supports the ability to call a routine exported by a
> DLL? If yes, does anyone know the SQL syntax to declare
> it in MS-SQLServer.
> Best regards
> Peter Sullvan
>|||In SQL Server 2000, you can create an extended stored procedure. See the
Books Online for details. For scalar functions, you can encapsulate an
extended stored procedure in a Transact-SQL scalar function like the example
below.
CREATE FUNCTION get_roof_angle()
RETURNS int
AS
BEGIN
DECLARE @.RoofAngle int
EXEC master..xp_get_roof_angle @.RoofAngle OUT
RETURN @.RoofAngle
END
GO
SELECT dbo.get_roof_angle()
GO
The planned SQL Server 2005 version will allow you to develop functions
using CLR managed code.
Hope this helps.
Dan Guzman
SQL Server MVP
"Peter Sullvan" <ps@.NOSPAMonline.de> wrote in message
news:%23Usr70jJFHA.3960@.TK2MSFTNGP09.phx.gbl...
> We have a few rather advanced calculation routines
> developed in C++. Currently we are using a Sybase ASA
> database for our app. and these routines are accessible
> by so called external functions exported by a DLL
> (dynamic link library) that we wrote in C++. Sybase
> supports this quite nicely.
> The client app can call such routines by:
> "select get_roof_angle() as angle from dummy;"
> or
> ":angle = call get_roof_angle();"
> Now we are checking if other databases can provide us
> with similar abilities. So I just wonder if MS-SQLServer
> supports the ability to call a routine exported by a
> DLL? If yes, does anyone know the SQL syntax to declare
> it in MS-SQLServer.
> Best regards
> Peter Sullvan
>|||To clarify my response, you can create extended stored procedures in all
versions of SQL Server. However, Transact-SQL functions are available only
in SQL 2000+.
Hope this helps.
Dan Guzman
SQL Server MVP
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:%23YTFuOkJFHA.1280@.TK2MSFTNGP09.phx.gbl...
> In SQL Server 2000, you can create an extended stored procedure. See the
> Books Online for details. For scalar functions, you can encapsulate an
> extended stored procedure in a Transact-SQL scalar function like the
> example below.
> CREATE FUNCTION get_roof_angle()
> RETURNS int
> AS
> BEGIN
> DECLARE @.RoofAngle int
> EXEC master..xp_get_roof_angle @.RoofAngle OUT
> RETURN @.RoofAngle
> END
> GO
> SELECT dbo.get_roof_angle()
> GO
> The planned SQL Server 2005 version will allow you to develop functions
> using CLR managed code.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Peter Sullvan" <ps@.NOSPAMonline.de> wrote in message
> news:%23Usr70jJFHA.3960@.TK2MSFTNGP09.phx.gbl...
>|||SQL Server only supports Extended Stored Procedures, no Extended Functions,
but you could wrap an extended stored procedure inside a user defined T-SQL
function and get the same behavior, but you need to use output parameters in
your extended stored procedure to return values, you can not return a result
set.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Peter Sullvan" <ps@.NOSPAMonline.de> wrote in message
news:%23Usr70jJFHA.3960@.TK2MSFTNGP09.phx.gbl...
> We have a few rather advanced calculation routines
> developed in C++. Currently we are using a Sybase ASA
> database for our app. and these routines are accessible
> by so called external functions exported by a DLL
> (dynamic link library) that we wrote in C++. Sybase
> supports this quite nicely.
> The client app can call such routines by:
> "select get_roof_angle() as angle from dummy;"
> or
> ":angle = call get_roof_angle();"
> Now we are checking if other databases can provide us
> with similar abilities. So I just wonder if MS-SQLServer
> supports the ability to call a routine exported by a
> DLL? If yes, does anyone know the SQL syntax to declare
> it in MS-SQLServer.
> Best regards
> Peter Sullvan
>

Wednesday, March 21, 2012

Extended stored procedure?

I noticed that there is something in master database called
Extended stored procedure which can be dlls? what's this? How can we make
our own sps a dll and put it somewhere like this?
Thankshttp://www.codeproject.com/database/extended_sp.asp
"Ray5531" <RayAll@.microsft.com> wrote in message
news:%23984aPOTFHA.612@.TK2MSFTNGP12.phx.gbl...
>I noticed that there is something in master database called
> Extended stored procedure which can be dlls? what's this? How can we make
> our own sps a dll and put it somewhere like this?
>
> Thanks
>|||Whoa, you really don't want to venture there. Xp runs as in-proc thus a
simple mistake in your custom xp can take the entire sqlserver down.
Anyway, here is some read.
http://msdn.microsoft.com/library/e...des_07_9rxv.asp
http://msdn.microsoft.com/library/e...con_01_22sz.asp
-oj
"Ray5531" <RayAll@.microsft.com> wrote in message
news:%23984aPOTFHA.612@.TK2MSFTNGP12.phx.gbl...
>I noticed that there is something in master database called
> Extended stored procedure which can be dlls? what's this? How can we make
> our own sps a dll and put it somewhere like this?
>
> Thanks
>|||Do they really have to be in Master Database only?
I don't know C++,is there another way of making an extended sp? like using
C#?
Thanks
"Michael C#" <howsa@.boutdat.com> wrote in message
news:%23Oc2HSOTFHA.2304@.tk2msftngp13.phx.gbl...
> http://www.codeproject.com/database/extended_sp.asp
>
> "Ray5531" <RayAll@.microsft.com> wrote in message
> news:%23984aPOTFHA.612@.TK2MSFTNGP12.phx.gbl...
>|||Not in managed code, no. AFAIK, SQL 2K5 will allow hosting of managed code.
I would either: 1) Write whatever you're trying to do as an external app and
run it separately from SQL Server, or 2) Wait for SQL 2K5.
"Ray5531" <RayAll@.microsft.com> wrote in message
news:%23ECPaUOTFHA.584@.TK2MSFTNGP15.phx.gbl...
> Do they really have to be in Master Database only?
> I don't know C++,is there another way of making an extended sp? like using
> C#?
> Thanks
> "Michael C#" <howsa@.boutdat.com> wrote in message
> news:%23Oc2HSOTFHA.2304@.tk2msftngp13.phx.gbl...
>|||Can I write my own sps as dlls in 2005 with managed code ?
Thanks
"Michael C#" <howsa@.boutdat.com> wrote in message
news:u1iDgeOTFHA.3216@.TK2MSFTNGP10.phx.gbl...
> Not in managed code, no. AFAIK, SQL 2K5 will allow hosting of managed
> code. I would either: 1) Write whatever you're trying to do as an external
> app and run it separately from SQL Server, or 2) Wait for SQL 2K5.
> "Ray5531" <RayAll@.microsft.com> wrote in message
> news:%23ECPaUOTFHA.584@.TK2MSFTNGP15.phx.gbl...
>|||> Do they really have to be in Master Database only?
Yes.

> I don't know C++,is there another way of making an extended sp? like using C#?[/co
lor]
Not managed code. Not classic VB (as it creates COM DLLs, not classic DLLs).
Only C, C++ or Delphi.
Another option is to write a COM object and use SP_OACreate etc. to use that
COM object.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ray5531" <RayAll@.microsft.com> wrote in message news:%23ECPaUOTFHA.584@.TK2MSFTNGP15.phx.gb
l...
> Do they really have to be in Master Database only?
> I don't know C++,is there another way of making an extended sp? like using
C#?
> Thanks
> "Michael C#" <howsa@.boutdat.com> wrote in message news:%23Oc2HSOTFHA.2304@.
tk2msftngp13.phx.gbl...
>|||I can't speak to extended sp's on 2K5, but my understanding is that you'll
be able to create SP's, functions, triggers and data types in managed code
that runs on SQL 2K5.
Here's a link to some MS Marketing stuff:
http://msdn.microsoft.com/msdntv/ep...>
manifest.xml
"Ray5531" <RayAll@.microsft.com> wrote in message
news:uIQ%23wxOTFHA.2096@.TK2MSFTNGP14.phx.gbl...
> Can I write my own sps as dlls in 2005 with managed code ?
> Thanks
> "Michael C#" <howsa@.boutdat.com> wrote in message
> news:u1iDgeOTFHA.3216@.TK2MSFTNGP10.phx.gbl...
>|||The official word regarding calling a .NET component with sp_OA* is "not
supported".
http://support.microsoft.com/kb/322884
However, David Browne has some work around...
http://tinyurl.com/4ur72
-oj
"Ray5531" <RayAll@.microsft.com> wrote in message
news:uIQ%23wxOTFHA.2096@.TK2MSFTNGP14.phx.gbl...
> Can I write my own sps as dlls in 2005 with managed code ?
> Thanks
> "Michael C#" <howsa@.boutdat.com> wrote in message
> news:u1iDgeOTFHA.3216@.TK2MSFTNGP10.phx.gbl...
>

Sunday, February 19, 2012

exporting to excel "no dlls found"

From terminal services i am trying to export a crystal report 8.5 to an excel file. When i click on export and then select excel an error pops up saying "no dll's found" and that is it. The funny thing is, I have crystal reports 8.5 loaded to my workstation and it works just fine. I am not using terminal services though, (I have crystal loaded locally) but even when i try it from the server that is running terminal services, i get the same error msg. I am almost positive that crystal reports 8.5 was loaded the exact same way to my machine as it was to the server. Does anyone know of a way that i can fix this problem.Make sure the Export dlls are installed in: C:\WINNT\Crystal (or similar if you're using a different OS)

Also, keep in mind that Crystal requires 2 dlls for export, one for the Export Type (pdf, Excel, etc) and one for the Destination (app, disk, etc). Look for the runtime.hlp file that came with Crystal. It will tell you which files you need to have installed for the type of Exporting you want to do.|||You wouldn't happen to know the name of the 2 dll files, I checked crystal reports support site and it says to Copy the export DLLs to the Windows\system directory. The export DLLs are the u2*.dll files. When i do a search on the install disk i find several u2*.dll files here is a list of them.
I'm guesing it is u2fxls.dll, u2fxml.dll but i want to be sure.

u252000.dll
u25dts.dll
u2dapp.dll
u2ddisk.dll
u2dmapi.dll
u2dnotes.dll
u2dpost.dll
u2dvim.dll
u2fcr.dll
u2fdif.dll
u2fhtml.dll
u2fodbc.dll
u2frdef.dll
u2frec.dll
u2fsepv.dll
u2ftext.dll
u2fwks.dll
u2fwordw.dll
u2fxls.dll
u2fxml.dll
u22l2000.dll
u2lcom.dll
u2ldts.dll
u2lexch.dll
u2lfinra.dll
u2lsamp.dll|||Accroding to runtime.hlp for Crystal Reports 8.5:

Destination Files:

FILE LOCATION DESCRIPTION
---------------------------
U2DAPP.DLL \WINDOWS\CRYSTAL Application destination
U2DDISK.DLL \WINDOWS\CRYSTAL Disk file destination
U2DMAPI.DLL \WINDOWS\CRYSTAL MAPI format (Microsoft Mail, Microsoft Exchange)
U2DNOTES.DLL \WINDOWS\CRYSTAL Lotus Domino destination
U2DPOST.DLL \WINDOWS\CRYSTAL Microsoft Exchange Public Folders
U2DVIM.DLL \WINDOWS\CRYSTAL VIM destination

Export Formats:

FILE LOCATION DESCRIPTION
--------------------------
U2FCR.DLL \WINDOWS\CRYSTAL Crystal Reports format
U2FDIF.DLL \WINDOWS\CRYSTAL DIF format
U2FHTML.DLL \WINDOWS\CRYSTAL HTML format See HTML under Additional Components for additional runtime information.
U2FODBC.DLL \WINDOWS\CRYSTAL ODBC data source
CRXF_PDF.DLL \WINDOWS\CRYSTAL PDF format Replaces U2FPDF.DLL from version 8.See Page Ranged Export under Additional Components for additional runtime information.
U2FRDEF.DLL \WINDOWS\CRYSTAL Report Definition format
U2FREC.DLL \WINDOWS\CRYSTAL Record format
CRXF_RTF.DLL \WINDOWS\CRYSTAL Rich Text FormatReplaces U2FRTF.DLL from version 8 and earlier.See Page Ranged Export under Additional Components for additional runtime information.
U2FSEPV.DLL \WINDOWS\CRYSTAL Comma Separated Values format
U2FTEXT.DLL \WINDOWS\CRYSTAL Text format
U2FWKS.DLL \WINDOWS\CRYSTAL Lotus 1-2-3 format
U2FWORDW.DLL \WINDOWS\CRYSTAL Microsoft Word for Windows format
U2FXML.DLL \WINDOWS\CRYSTAL XML format
U2FXLS.DLL \WINDOWS\CRYSTAL Microsoft Excel format|||On my machine the export button works, so i copied all the u2*.dll files from my machine and pasted them in the winnt\crystal folder on the server and the export button still doesn't work, it gives the same error msg. "no dll's found"
Any other ideas would be greatly appreicated. Thank you.|||Try looking up the exact error message and/or error number on Google (or another search engine) or Crystal's Website (http://support.businessobjects.com/search/default.asp).|||hi guys!

just want to ask if u can give an idea how to fix exporting report in vb app...
im using an vb app that used crystal report 8.5 and installed in several client pc... but if im exporting the files it doesnt work... nothing was happen... do i need to install also a crystal report software in every pc to install the required dll's?

thank you very much!|||benjz -

Did you read this post? You have to have the correct export dlls installed on the client machine in order for Export to work. (To install the dll, just copy and paste it into the directory listed above. Also, make sure you include those dlls in your setup file as they may have dependencies that I don't about)

Also, if you post your own question (instead of adding it to an existing post), you'll get a better response. (Click the 'New Thread' button on the main page of this forum.)