COM .NET Interop - How to return a DataTable in NET to COM

Hi, I need help here.. I have this problem.
I have COM VB6 that call a .NET class library, and this class library use the .NET SAP Conector to extract the information from SAP. I receive the information from SAP in a DataTable, the problem here is that I dont how to return this DataTable to VB6 COM.
I made a test, and I can return a String to COM and basic types, but I dont know how to do it with this DataTable.
Thanks for your help
I really appreciate.
7/18/2005 1:48:02 PM 1945 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 43

One alternative might be to add the DataTable to a DataSet and then convert the DataSet to an XML string using WriteXml().

That said, quick question: Any reason why you're using .NET in this case instead of using the exising COM Sap Connector? Wouldn't that be easier?

Tomas Restrepo [MVP]
7/19/2005 12:08:26 PM

Thanks for you help Tomasr.

I already solve the problem, I dont like the process but its working, right now Im copying all the rows of the datatable to a recordset and then returnig the recordset to VB6. And Im going to test converting the DataTable to xml to see if works better.

I dont use de COM connector because I think its obsolete, and I didnt find complete documentation.



7/19/2005 2:38:23 PM

Similar Artilces:

.NET to COM question ( Dictionary in COM and .NET dictionary)
 I need to write a data access code to replace the method of GetPerson() in COM data access, since the existing method is too slow. .NET can reduce the database round trips by using the dataset. The existing COM data access will stay except the GetPerson() method. So I am going to call the .NET getPerson() mehtod from the COM,  The original GetPerson() method in COM just go to data base, pull data from 7 tables and write to dictionary.  If the .NET getPerson() can populate the COM Dictionary, that would be great! I know .NET object can be directly assign t...

------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

Call to non .net COM not working after .NET
I have developed small samples of ASP.NET and one of them I tried to call a standard COM (non .NET). I took the code out for now, but a call to that COM from traditional ASP application now does not work. Does anyone have an idea how to correct this?...

.NET classes hindering .net assembly from being com?
I posted an earlier thread about instanciating a .net assembly from a com client, like an asp page. My problem was that no matter what I did, I could not get the class to instaciate, so I could not call any methods on that class. After quite a bit of trial and error, as far as weak and strong named assemblies, GAC, etc, I came to the conclusion that the object WAS being referenced properly, therefore it was not a problem getting access to the object's class declaration. My problem was that everytime I called a method on the object, I got a "object not set to instance" error. ...

.net com interop
I know this is the wrong venue but I have looked everywhere and I am getting nowhere. Im not a client side fan, but I have no choice in this case. Heres what I want to do: Create a .net dll with com interop checked. I then want to access that dll with client with script. I also want to use "on demand download" style object for example the way gotdotnet works by installing that cab file: another example is from a reporting tool we use called active reports for .net they have a cab file and you place this code in the html and it downloads and gets it reg. now - ?...

SN #3
Steve, At about 6 min 20 secs left of the full broadcast, you mentioned Putting it into my browser gave me a 404 Page not found. Just thought I should mention it. -- Jaap Jaap said in:<news:df997m$6qf$>: > Steve, > > At about 6 min 20 secs left of the full broadcast, you mentioned > Putting it into my browser gave me a 404 Page > not found. > > Just thought I should mention it. He's meant to be saying :- ,------------ [quote] So one trick...

Hi, Are there samples or documentation showing using either a .NET C# DLL COM Server with a C++ Builder 2009 Client or a C++ Builder COM Server with a .NET C# EXE Client? What can I do about "80131535 COR_E_MARSHALDIRECTIVE : The marshalling directives are invalid" errors. Any changes I make to my arguments cause compiler errors. Thanks cfi ..NET C# DLL COM Server with a C++ Builder 2009 Client OLETRACE "Inv(1610743808) FL, 0x80131535, retVT(0x1), ErrArg(-1)\n" Lines causing error IManagedInterfaceDisp getReverseNames; getReverseNames.BindDefaul...

To .NET or not .NET, that is the question
I'm running WinXP pro 32-bit, meaning I've got the version 1-dot-something of .NET that XP came with. I've been looking for various softwares, and more and more often come across .NET version 2 being prerequisite. No urgency for me re. my questions to this group - so far I have just decided to hit the red X on those download pages - but the desire for this newer version of .NET seems to be growing for me. Firstly, according to my (limited) research, newer .NET versions are inclusive of the previous ones, and the current version seems to be 3.5. So if I go for i...

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

COM and .NET?
Hello I have a few basic questions I hope someone can help me with. 1.Let's say I create a .dll in Visual Basic 6 - just a class with one function. I then register this dll and can call it from an .asp page using server.createObject. Using this dll like this is referred to as COM right? 2. How do I access this dll from a .Net app? 3.COM+ Is an extension of com right? Using Microsoft Transaction Server with COM objects? What exactly is MTS and how would I use it from an asp page and also - is it used in conjunction with .net web apps? 4.Where can I get MTS (is part of windows or...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

net send in .net
Hi,  I am trying to execute net send comman in my code. But I am getting "win32 exception unhandled error". Please help me. My code is:Dim psi As New ProcessStartInfo() psi.UseShellExecute = False psi.FileName = "Net send" '  - IP address of a system in my network psi.Arguments = " test" Process.Start(psi)  Thanks in advance! Shwetha Tryu changing   psi.FileName = "Net send" '  - IP address of a system in my network psi.Arguments = " test&quo...

Net Farmers net
Has anyone been able to access any of the tests at ? I can get the default page but none of the tests appear to be operating over the last several weeks. -- CK I just tested and works as usual!!!Every session TCP_error,because my Shields_guard is intact<<G>> -- Regard: Joh@nnes� 1216771 Ont.Inc. "Nothing is more damaging to a new truth than an old error" "CK" <> wrote in message news:9i45gg$1qa9$ : Has anyone been able to access any of the tests at : http://suicide...

from COM to .NET
Hi all, My company are slowly migrating from vb6/com environment to a .net/web service environment. At the moment we have a financial system running on our intranet that allows user to request and retrieve reports- we have a .Net web service that retrieves these requests and passes them on to a COM dll, which queries the database and generates the reports using Crystal. After some testing, we've found that when there's more than one person running reports, the system crashes. After some research i've found out that calling a COM component with a .net web service can have threading iss...

Web resources about - COM .NET Interop - How to return a DataTable in NET to COM -

Stack Overflow
Stack Exchange log in - careers - chat - meta - about - faq Questions Tags Users Badges Unanswered Ask Question Top Questions interesting 325 ...

University of Southampton - Wikipedia, the free encyclopedia
The University of Southampton is a British Russell Group university located in the city of Southampton , United Kingdom . The origins of the ...

London Metropolitan University - Wikipedia, the free encyclopedia
London Metropolitan University (London Met), located in London , England , was formed on 1 August 2002 by the amalgamation of the University ...

Google Chart Tools — Google Developers
This page has moved to Google Developers. Welcome! Learn more Dismiss Home Products Events Showcase Google Chart Tools Overview Hello Charts! ...

Google Chart Tools — Google Developers
Powerful, simple to use, and free.

AribaWeb ( - Google Groups
Search Images Maps Play YouTube News Gmail Documents More Calendar Translate Mobile Books Offers Wallet Shopping Blogger Reader Finance Photos ...

Linux Syscall Reference
Generated from Linux kernel using Exuberant Ctags , Python , and DataTables . Developed and maintained by Greg Ose .

... over one weekend where the author had a bit of extra time on his hands. Built with the help of the following tools: Bootstrap jVectorMap DataTables ...

A Map for the Microsoft Application Development Platform
... Localization N-Tier Remote Data Security Silverlight SQL Azure SQL Server Streaming XML Features ADO.NET DataSet ADO.NET DataTable ...

Application Development Framework
Articles: Application Development Framework

Resources last updated: 12/26/2015 12:42:13 PM