473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Converting VMS C to Windows C++ or C#

I have been given a project originally written in VMS C. It is
extensive code, with a number of complex algorithms. It also
accesses
an Oracle database via Embedded SQL.

The code is to be ported to a Windows Server 2003 environment. The
database will be ported to Microsoft SQL Server.
I have a couple of choices:
The most ideal choice from a long-term standpoint is to convert the
code to C# and use OLEDB to access the database. Everythings going
to
C#, as far as I can see. I have also used OLEDB in VB applications
so
I am familiar with it. The downside is that there is no "nice"
conversion from unmanaged C code to C#. I see a number of nasty,
unknown gotchas that could pop up. Even if I find a good conversion
package, there would be major work ahead.
The second choice is to convert to C++ and use the standard ODBC
classes (CDatabase, CRecordset) to access the database. This is
somewhat easier, as more of the original code could be carried over.
The downside here is that I'm left with an application that uses a
platform and functions that will be outdated sooner. From what I can
see, ODBC is falling slowly out of use. At least most of the
articles
I see on the internet are at least a year old, most are older. I
could be wrong, though.
The operating constraints for the project are that I have some extra
time in for R&D, but not a huge amount. The same applies to the
budget. The project manager does not want to risk getting bogged
down
trying to get the newest software to work on the old code. Having
converted one project from VB 6.0 to VB.NET a few years back, I can
testify that what looks like a fairly simple conversion usually
isn't.
I would appreciate any recommendations and/or input as to which way I
should go.

Nov 14 '07 #1
3 1609
My gut tells me that you should simply recompile the C using just the Microsoft C compiler, and not even bother trying to convert to
C++ on the first pass. Concentrate your efforts on the SQL interface. If there is time afterwards, consider touching up the key
parts to C++, and possibly even using the ATL OLE DB Templates. (cf. http://msdn2.microsoft.com/en-us/lib...16(VS.80).aspx)

Nobody is going to thank you for updating to C#/SQLAdapter if you blow your schedule or your budget. Get it running under Windows
Server 2003 is the first priority.

(Just my gut feel.)

Brian

"fdmaxey" <fd*****@yahoo.comwrote in message news:11**********************@v3g2000hsg.googlegro ups.com...
>I have been given a project originally written in VMS C. It is
extensive code, with a number of complex algorithms. It also
accesses
an Oracle database via Embedded SQL.

The code is to be ported to a Windows Server 2003 environment. The
database will be ported to Microsoft SQL Server.
I have a couple of choices:
The most ideal choice from a long-term standpoint is to convert the
code to C# and use OLEDB to access the database. Everythings going
to
C#, as far as I can see. I have also used OLEDB in VB applications
so
I am familiar with it. The downside is that there is no "nice"
conversion from unmanaged C code to C#. I see a number of nasty,
unknown gotchas that could pop up. Even if I find a good conversion
package, there would be major work ahead.
The second choice is to convert to C++ and use the standard ODBC
classes (CDatabase, CRecordset) to access the database. This is
somewhat easier, as more of the original code could be carried over.
The downside here is that I'm left with an application that uses a
platform and functions that will be outdated sooner. From what I can
see, ODBC is falling slowly out of use. At least most of the
articles
I see on the internet are at least a year old, most are older. I
could be wrong, though.
The operating constraints for the project are that I have some extra
time in for R&D, but not a huge amount. The same applies to the
budget. The project manager does not want to risk getting bogged
down
trying to get the newest software to work on the old code. Having
converted one project from VB 6.0 to VB.NET a few years back, I can
testify that what looks like a fairly simple conversion usually
isn't.
I would appreciate any recommendations and/or input as to which way I
should go.
Nov 14 '07 #2
fdmaxey wrote:
I have been given a project originally written in VMS C. It is
extensive code, with a number of complex algorithms. It also
accesses
an Oracle database via Embedded SQL.

The code is to be ported to a Windows Server 2003 environment. The
database will be ported to Microsoft SQL Server.

I have a couple of choices:

The most ideal choice from a long-term standpoint is to convert the
code to C# and use OLEDB to access the database.
If you go .NET you will not want to use OLE DB but instead use
the .NET SqlClient.
Everythings going
to
C#, as far as I can see. I have also used OLEDB in VB applications
so
I am familiar with it. The downside is that there is no "nice"
conversion from unmanaged C code to C#. I see a number of nasty,
unknown gotchas that could pop up. Even if I find a good conversion
package, there would be major work ahead.
I think that is correct.
The second choice is to convert to C++ and use the standard ODBC
classes (CDatabase, CRecordset) to access the database. This is
somewhat easier, as more of the original code could be carried over.
The downside here is that I'm left with an application that uses a
platform and functions that will be outdated sooner.
A third option would be to go for managed C++ (C++/CLI is the name
this month I think) as language and .NET SqlClient as database
API.

It should be easier to port to C++ than to C#. You get a good
database API.

You can migrated to C# gradually over the coming years.

Arne
Nov 15 '07 #3
If you are interested in outside help, Datatek, Inc offers an
automated C/C++ to C# conversion service. We can produce nice clean C#
code and we guarantee our results. Feel free to give me a call or
shoot me an email if you would like more information.

Charles Churchill
Account Executive
Datatek, Inc.
800 536-4835 ext. 145
1 919 425-3145 (international)
ch*******@datatek-net.com
Nov 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: atif | last post by:
Hi All Can we convert Windows Forms into Web Forms and/or vise versa? I have heard that this is possible through some third party tool, i m not sure. if yes then how much it will cost, i...
3
by: sunny076 | last post by:
Hi, I am trying to convert from Julian to Gregorian data in C#. I was exploring teh JulianCalendar and Gregorian calendar classes but still not sure how I can do it. For example, the Julian date...
2
by: Penn | last post by:
Hi, Has anyone converted from 2.0? Let me know how it went - and if there is a good reference for converting the code in addition to the database. - SH
5
by: Robert | last post by:
I have a series of web applications (configured as separate applications) on a server. There is a main application at the root and then several virtual directories that are independant...
3
by: Derek Martin | last post by:
Hi there, kind of a dumb question, but it falls in line with not understanding (go figure) every nuance about .Net. Is it relatively straight forward to convert a VB.Net built app to an ASP.Net...
0
by: Rich | last post by:
(1) Is there a better place to pose the question below? (2) I am starting to convert my enterprise solution from VS 2003 (.NET v1.1.4322) to VS 2005 Professional (.NET v2.0.50727). The entire...
28
by: Randy Reimers | last post by:
(Hope I'm posting this correctly, otherwise - sorry!, don't know what else to do) I wrote a set of programs "many" years ago, running in a type of basic, called "Thoroughbred Basic", a type of...
1
by: manesh | last post by:
Hi, I am new to c# applications, rite now I am doing a project which needs creation of windows forms application, this windows forms needs to be converted to asp pages. I have a doubt in my...
3
by: Jone | last post by:
Hello, I have tried to convert a Mac text file to Windows using code below. Encoding Win = Encoding.GetEncoding("Windows-1252"); Encoding Mac = Encoding.GetEncoding("macintosh"); byte...
1
RRick
by: RRick | last post by:
I have a unix C++ project that needs to be converted over to windows visual studio. I'm not sure of the exact version of VS, but it's a recent version, probabIy 2003 or 2005. I would like the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.