Showing posts with label migrating. Show all posts
Showing posts with label migrating. 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.

replacement of *= in 2005

Hi,
We are migrating to 2005 and there are some old queries that use *= in the
sql. Is it no more used?
Whats the other way to get the same functionality?
ThanksCheck out LEFT OUTER JOIN in the BOL.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"mavrick_101" <mavrick101@.discussions.microsoft.com> wrote in message
news:C3A7A6B0-2CCD-4EB3-B807-23A692DCC44F@.microsoft.com...
Hi,
We are migrating to 2005 and there are some old queries that use *= in the
sql. Is it no more used?
Whats the other way to get the same functionality?
Thanks|||Are you familiar with LEFT OUTER JOIN syntax? That's what you should be
using.
"mavrick_101" <mavrick101@.discussions.microsoft.com> wrote in message
news:C3A7A6B0-2CCD-4EB3-B807-23A692DCC44F@.microsoft.com...
> Hi,
> We are migrating to 2005 and there are some old queries that use *= in the
> sql. Is it no more used?
> Whats the other way to get the same functionality?
> Thanks|||> We are migrating to 2005 and there are some old queries that use *= in the
> sql. Is it no more used?
Set database compatibility level (sp_dbcmptlevel) other than 90 (70, 80)

> Whats the other way to get the same functionality?
Left outer join (* =)
Right outer join (= *)
Full outer join (* = *)
AMB
"mavrick_101" wrote:

> Hi,
> We are migrating to 2005 and there are some old queries that use *= in the
> sql. Is it no more used?
> Whats the other way to get the same functionality?
> Thanks|||use left outer join
"mavrick_101" wrote:

> Hi,
> We are migrating to 2005 and there are some old queries that use *= in the
> sql. Is it no more used?
> Whats the other way to get the same functionality?
> Thanks|||>> Full outer join (* = *)
' I doubt if it was there.
Anith|||Thanks Anith.
AMB
"Anith Sen" wrote:

> ' I doubt if it was there.
> --
> Anith
>
>

Friday, March 23, 2012

replace out of range dates

Hi,

I'm migrating data from access 2003 to sql server 2005. An access table contains dates like 5/1/0999. This is a date that is out of the datetime range from sql server.

Now my question is ... How do I replace these dates? I don't find something like IsDate in the expressions?

Ok

I did it with a Derived Column task.
It replaces the date column values who have out of range dates. (It only checks for dates smaller then 1/1/1753)

The expression is like this: [DateToCheck] < (DT_DATE)"1753-1-1" ? (DT_DATE)"1753-1-1" : [DateToCheck]

REPLACE Oracle function in SQLServer 2000

Hi everyone. I'm currently migrating our system from Oracle to SQLServer. How can I switch the REPLACE Oracle function? Is there any function in SQLServer that do the same thing, or any function that has something near the REPLACE? I was trying the STUFF function, but it uses different parameters, and the migration will be stuff(something like 18k of SQL lines :( ).
Thanks in advance and Best Regards
Rafael Mauricio Nami
Have you had a look at replace?|||Thanks, I've got the wrong SQLServer book :)