|
-
Oct 8th, 2002, 03:29 AM
#1
Thread Starter
Fanatic Member
Pro*C compiler/SQL in VC++
Is there any Pro*C compiler available for Windows?
Can I use Pro*C (or embedding SQL in C) in Visual C++ 5.0?
Since it is possible to embed DAO/ADO inside VB, I think it should be possible to use SQL in Visual C++ also. But I've no idea how to use it.
Can anyone help?
Thank you very much... :-)
Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.
-
Oct 8th, 2002, 05:36 AM
#2
Thread Starter
Fanatic Member
Well, can you please tell me how should I write following VB code in VC++?
<vbcode>
'ADO has been referenced in the VB project
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sql As String, strCnn As String
strCnn = "DSN=MyDatabase"
Set cnn = New ADODB.Connection
Call cnn.Open(strCnn)
sql = "select count(*) from world_countries"
Set rs = New ADODB.Recordset
Call rs.Open(sql, strCnn, adOpenDynamic)
MsgBox rs(0).Value
</vbcode>
How do I add reference of ADO to VC++ project?
Can I do it in a console mode application or DLL?
Any help is welcome. You can also provide any useful links.
thanks a lot.
Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.
-
Oct 8th, 2002, 06:07 AM
#3
Frenzied Member
Yes. Pro*C for windows NT is available. You can deploy to a Win9x (consumer Windows) client.
It works with MSVC++ 5.0 & 6.0. Obviously, you have to purchase the pre-compiler.
IMO, using ADO C++ is not productive - it works, but is fairly painful. VB or Pro*C is a lot faster in terms of development times.
We use COM servers written in Pro*C, talking to VB clients.
And Oracle Forms as well.
The other issue - which is more important - MS drivers for ADO do not provide full access to all of Oracle's SQL and PL/SQL features.
Pro*C does. But it must use Oracle drivers.
Another point - Oracle licenses on a per seat basis. Therefore, every PC that connects to an Oracle server (except via Microsoft drivers, hence one reason why Ellison & Bill Gates love each other) must pay that licensing fee. We use the Merant (Oracle) drivers.
-
Oct 9th, 2002, 10:31 AM
#4
Thread Starter
Fanatic Member
Well, thanks for your comments. But could you please still help me writing that ADO code in VC++?
Thanks a lot
Life is a one way journey, not a destination. Travel it with a smile and never regret anything.
Yesterday is history, tomorrow is a mystery, today is gift - that's why we call it present.
-
Oct 9th, 2002, 11:31 AM
#5
Frenzied Member
I don't do ADO, some other programmers here do. They said 'tell him to avoid it or learn MFC and ADO'
Start here:
http://codeguru.earthweb.com/mfc_database/Ado_Aok.shtml
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|