Showing posts with label references. Show all posts
Showing posts with label references. Show all posts

Wednesday, March 28, 2012

Replacement of C code with C# code

All - I am looking for a starting point on references for migrating a DLL
written in C (and the associated XP that goes with it) to C#. I would like
to be able to use the managed code that SQL has instead of keeping the XP (a
s
it has ran into some security issues, and there is always that possibility
that it could blow up and make me restart SQL). Any good web references or
books (well maybe the books are not out yet)? Many thanks.Why? C is portable, highly optimizable and C# is just proprietary
without much history for good compilation.
If you really need a secure system, then you need get away from MS
products and move to UNIX family products designed by that. .|||Better yet, just write it all in assembler. Be a man!
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1138242313.806455.76760@.f14g2000cwb.googlegroups.com...
> Why? C is portable, highly optimizable and C# is just proprietary
> without much history for good compilation.
>
> If you really need a secure system, then you need get away from MS
> products and move to UNIX family products designed by that. .
>|||Hi Al,
You probably need to write a stored procedure using CLR; its not that
difficult - significantly easier than extended stored procedures and you
don't have to worry about bringing SQL Server so long as you use SAFE or
EXTERNAL.
This topic area in MSDN has a lot of what you need to get started :
http://msdn2.microsoft.com/en-us/library/ms254498.aspx
Tony
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Al" <Al@.discussions.microsoft.com> wrote in message
news:B9E55A17-6D2F-4252-9637-5E8740F40988@.microsoft.com...
> All - I am looking for a starting point on references for migrating a DLL
> written in C (and the associated XP that goes with it) to C#. I would
> like
> to be able to use the managed code that SQL has instead of keeping the XP
> (as
> it has ran into some security issues, and there is always that possibility
> that it could blow up and make me restart SQL). Any good web references
> or
> books (well maybe the books are not out yet)? Many thanks.|||So you advocate using extended stored procedures?

> C# is just proprietary
> without much history for good compilation.
LOL - I guess you've only just started to realise that C# is a programming
language rather than a key on a piano.
C# has been around for a number of years and is extensively used by
programmers using the .NET platform.
Unlike C, C#, specifically the .NET platform has lots of security built-in
to prevent you coding buffer overflows, helps you by disposing memory that
in C you can forget to do, won't let you create pointers to memory you don't
own etc... etc...
As for security, I feel a lot more comfortable using the MS platform because
its the widest used platform on the planent and as such is the main hackers
target, I don't see many security holes coming out anymore - the majority
have been plugged. UNIX on the other hand, there are lots of holes, and when
one is found it takes forever to get a fix; with MS its usually days or at
the latest ws.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1138242313.806455.76760@.f14g2000cwb.googlegroups.com...
> Why? C is portable, highly optimizable and C# is just proprietary
> without much history for good compilation.
>
> If you really need a secure system, then you need get away from MS
> products and move to UNIX family products designed by that. .
>|||No, be a real man - write it directly in binary!
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Jeff" <A@.B.COM> wrote in message
news:e2Lu7MjIGHA.668@.TK2MSFTNGP11.phx.gbl...
> Better yet, just write it all in assembler. Be a man!
>
>
> "--CELKO--" <jcelko212@.earthlink.net> wrote in message
> news:1138242313.806455.76760@.f14g2000cwb.googlegroups.com...
>|||Real men don't even use any I/O devices, other than themselves. Punching in
+/- 3 Volts is only a pain for the first thousand or so ticks.
ML
http://milambda.blogspot.com/|||Here we go; propagating the myth the UNIX is more secure than Windows.
Let's see, UNIX gets it start in the 1960s, and has been hacked away at for
nearly half a century. Windows NT born around 1994. Getting the drift?
Go to www.cert.org and look at historical vulnerability data. Just as many
(if not more) items concerning UNIX/Linux as Windows in the past 10 years.
Mark Williams, MCSE: Security, MCDBA
"--CELKO--" wrote:

> Why? C is portable, highly optimizable and C# is just proprietary
> without much history for good compilation.
>
> If you really need a secure system, then you need get away from MS
> products and move to UNIX family products designed by that. .
>|||"Tony Rogerson":

> So you advocate using extended stored procedures?
>
> LOL - I guess you've only just started to realise that C# is a programming
> language rather than a key on a piano.
> C# has been around for a number of years and is extensively used by
> programmers using the .NET platform.
> Unlike C, C#, specifically the .NET platform has lots of security built-in
> to prevent you coding buffer overflows, helps you by disposing memory that
> in C you can forget to do, won't let you create pointers to memory you
> don't own etc... etc...
In addition (ignoring the fact that an XP for SQL Server written in C isn't
very portable), C#, C++/CLI, and the CLI are all ECMA standards. The ECMA
standards for C# and the CLI are alreeady ISO standards and C++/CLI is
supposed to be fast-tracked.
Craig|||Consider hooking the DLL into a client side application or on a designated
application server. Any executable that interacts with external services can
misbehave, regardless of the language, compiler or OS platform.
"Al" <Al@.discussions.microsoft.com> wrote in message
news:B9E55A17-6D2F-4252-9637-5E8740F40988@.microsoft.com...
> All - I am looking for a starting point on references for migrating a DLL
> written in C (and the associated XP that goes with it) to C#. I would
> like
> to be able to use the managed code that SQL has instead of keeping the XP
> (as
> it has ran into some security issues, and there is always that possibility
> that it could blow up and make me restart SQL). Any good web references
> or
> books (well maybe the books are not out yet)? Many thanks.

Friday, March 9, 2012

Repeat on Every Page - For Headers

Using SSRS 2005:
I created a text box in my report header, which references a text box in my
report body: =ReportItems!textbox88.Value
In my report body, hidden textbox88 contains my data:
=Format(Parameters!StartDate.Value, "dd MMM yy HH:mm:ss")
This all works great, except for the fact that textbox88 only exists on the
first page, so the header only has a value on the first page.
Here's the question: How do I make textbox88 Repeat on Every Page, which
let's me see a value in the header on Every Page?
Thanks,
--
RandyYou could copy that box into your page header instead of your report
headrer.
"randy1200" <randy1200@.newsgroups.nospam> wrote in message
news:6BAB5E73-F556-4778-8B89-766C99075F90@.microsoft.com...
> Using SSRS 2005:
> I created a text box in my report header, which references a text box in
> my
> report body: =ReportItems!textbox88.Value
> In my report body, hidden textbox88 contains my data:
> =Format(Parameters!StartDate.Value, "dd MMM yy HH:mm:ss")
> This all works great, except for the fact that textbox88 only exists on
> the
> first page, so the header only has a value on the first page.
> Here's the question: How do I make textbox88 Repeat on Every Page, which
> let's me see a value in the header on Every Page?
> Thanks,
> --
> Randy|||I'm working with SSRS 2005 using Visual Studio 2005. I don't see what the
difference is between a page header and report header. I created the header
by viewing the report in the Layout tab, right-clicking off to the side of
the page, and selecting "Page Header."
There are many posts in the archives here that describe why you can't put
fields directly into headers. Fields must be put into something in the body
and then the header can reference that something to allow the data in appear
in the header.
I still haven't been able to spot anything that allows a field in the body
to repeat on every page, so that the data in the field appears in the header
on every page.
--
Randy
"Ben Watts" wrote:
> You could copy that box into your page header instead of your report
> headrer.
> "randy1200" <randy1200@.newsgroups.nospam> wrote in message
> news:6BAB5E73-F556-4778-8B89-766C99075F90@.microsoft.com...
> > Using SSRS 2005:
> >
> > I created a text box in my report header, which references a text box in
> > my
> > report body: =ReportItems!textbox88.Value
> >
> > In my report body, hidden textbox88 contains my data:
> > =Format(Parameters!StartDate.Value, "dd MMM yy HH:mm:ss")
> >
> > This all works great, except for the fact that textbox88 only exists on
> > the
> > first page, so the header only has a value on the first page.
> >
> > Here's the question: How do I make textbox88 Repeat on Every Page, which
> > let's me see a value in the header on Every Page?
> >
> > Thanks,
> > --
> > Randy
>
>|||I see that textbox88 takes its value from a report parameter rather than a
dataset, so there is no need for the page header text box to take its value
from textbox88. It can be taken directly from the parameter!The expression
for your page header textbox can be:
=Format(Parameters!StartDate.Value, "dd MMM yy HH:mm:ss")
HTH,
magendo_man
"randy1200" wrote:
> Using SSRS 2005:
> I created a text box in my report header, which references a text box in my
> report body: =ReportItems!textbox88.Value
> In my report body, hidden textbox88 contains my data:
> =Format(Parameters!StartDate.Value, "dd MMM yy HH:mm:ss")
> This all works great, except for the fact that textbox88 only exists on the
> first page, so the header only has a value on the first page.
> Here's the question: How do I make textbox88 Repeat on Every Page, which
> let's me see a value in the header on Every Page?
> Thanks,
> --
> Randy