473,395 Members | 1,556 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,395 software developers and data experts.

How do I call MSDASC::DataLinks::PromptNew() undr .Net C++

Gentleman:

I'm trying to get the DataLink to work under C++, and I need help. I'm able to make it work under VB and C#, but not C++. Under C# (with references to "adodb", and "MSDASC") , I would accomplish this by the following code:

ADODB._Connection cn; //Define ADO Connection.

MSDASC.DataLinks dataLink = new MSDASC.DataLinks():
cn = (ADODB._Connection) dataLink.PromptNew();

Under C++, I would expect some like this:

#using <adodb.dll> //Both using had to be "Resolve #using References" under the Property Pages C/C++.
#using <Interop.MSDASC.dll> //... because MSDASC alone fails, even though I resolved under the Property Pages.

ADODB::Connection* cn; //This line compiles OK, so long as the resolves have been done.

MSDASC::DataLinks* dataLink = new MSDASC::DataLinks(); //FAILS:Error C2061:Syntax error: identifier DataLinks
cn = (ADODB::Connection) dataLink->PromptNew() //Can't get this far because the previous line fails. I'm just guessing at this point.

I go to MSDN, and there is no definition for Error C2061, so I am faces with a mystery. I realize that this is Unmanage code, but certain there must be a way to call up the DataLink from .Net C++. Would someone please advise how I can get around this problem.

Sincerely,

Burton G. Wilkins, Programmer.

P.S: The libraries I am using are these:
MSDASC = c:\Program Files\Word\Samples\C++\AccessMaintenance\Debug\Int erop.MSDASC.dll Microsoft OLE DB Service Component 1.0 Type Library
ADODB = C:\Program Files\Microsoft.NET\Primary Interop Assemblies\adodb.dll

Nov 16 '05 #1
0 2595

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

Similar topics

1
by: LWoodIS | last post by:
Do you know any way to invoke UDL from a Windows Application? I want the user to specify connection parameters, currently I use SQLDMO to display Servers, Databases, and enter userid & password....
0
by: Denis ERCHOFF | last post by:
Hi, The OpenSchema method (ADODB._Connection object) seems to work fine in VB but not with C# .... Why? Someone have a solution? My code :
2
by: Doug | last post by:
Hi, I was wondering if someone can help me - I need to provide the user with the DataLinks dialog box and then use the connection string that is generated from it. I've tried, but can't figure...
3
by: Steph. | last post by:
Hi, How can I display to the user the "Connection String Dialog" (The Dialog to build connection string) in my application ? Thanks, Steph.
0
by: Jay Douglas | last post by:
Hello, I'm trying to create a Data Links Property window that behaves just like the dialog box in Visual Studio .Net for MS Sql Server connections. I've found a lot of examples that use...
1
by: Duncan Winn | last post by:
I am trying to connect to an INTRBASE database through the MS OleDb.NET provider, however I am unsure of what to use for the connection string. How can I find this out???
1
by: Burton Wilkins | last post by:
Dear Brandon: You sent me some advice before as to how get the DataLink working, but I haven't been able to get your solution to compile: You sent me this: >Hi Burton, I was able to get the...
0
by: cui_y_x2002 | last post by:
------------------------------------in VB------------------------------------------------------------------ Dim oDataLink As Object 'MSDASC.DataLinks Dim oCon As Object ...
1
by: Ove | last post by:
Hi, I'm a newbie when it comes to Oracle, but I was asked to check if an application could run with Oracle, so I installed Oracle XE. The application is an older VB6 app. I installed Oracle...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.