DataTable Object to RecordList Conversion

DataTable Object to RecordList Conversion

I'm using a ODBC to connect to an outter Database using Integration Studio. This ODBC, is returning DataTables of type Object.

How can I use this object types by converting the result to RecordLists?

Any suggestions?

Thank's in advance,
Best Regards,
Francisco Neto
Hi Francisco,

Why ODBC is returning DataTables of type Object and not Record?

A think is more easy to you if you have a output RecordList.

Give you an example, hope it help...
I was trying (and hoping) to get an easy solution.
But it makes sense. So, I have to create a class of type record, and fill it "by hand" through code, right? Doing so, I would have to create entities in Service Center to equal those Records to the entities.
Is this correct?

I don't remember too well c# coding, and that's why I was trying to avoid going down on the code.

Really thank's for the help,
Best Regards

You don´t have to create entities en ServiceCenter....

In integration you must create structures that receives the data from your c# code, with the input variables, like Username and Passwd etc, and an output of type Record to load the data.

Hope that help!
That is really helpfull. But I still have some doubts (sorry for asking all the details, but I'm trying to catch up).
You are using a RLTAB_DADOSERecordList method that I suppose returns a record List, but what does it receives? What type? And, still with this funtion, I suppose that thos method has the ssNSName, ssNSUsername, etc.

Then, tou use a RCTAB_DADOSRecord, that I presume return a record. This Class, where is it defined? Is it the structure?

In really does much more sense using a structure instead of an entitiy.

Thank's for all the help, I really appreciate it.

Best Regards

In integration you must define your input variables like string, int, record, or recordlist, etc, and you must have another Struct with de RecordList that will be your output, to be called by type recordlist.
I'm now starting to realize that I've been asking some foolish questions. I think I can figure the rest out for myself.
Sorry for the "newbism" and thank's for the help
I'm still having some problems trying to connect to DB2.
I've been trying to get some driver in .NET assembly to integrate ditectly with Outsystems Integration Studio, but still didn's succeed.
Could you tell me, Ivan, wich OleDB driver did tou use in your example to connect to DB2?

Thank's once again for the help,
Best Regards
I've already managed to connect to db2... finally! I just used the IBM namespace for db2 called IBM.Data.DB2.dll located in (my specific case) C:\Program Files\IBM\SQLLIB\BIN\netf20 and integrated it in Integration Studio... easy....
Best Regards

I'm trying to use Integration Studio to connect to a MS Access database file, in order to imput data from that file to my OutSystems application database.

I need to do this in runtime: the user indicates the MS Access database file path and i pass that information to the extension, wich will open the file and get the data.

I've been checking Ivan's code solution, and i'm using someting similar.

My problem is when the extension tries to open the connection, it gives a "Object reference not set to an instance of an object" (something like NullPointerException i think...) message error...

I already checked if the values (MS Access file location)  passed from the OutSystems application to the extension where ok... and i also tried this solution in a MS Visual Studio independent project and it worked well...

The error occurs when the connection.Open() method is executed but I have no clue why it isn't working... any suggestions???

I attached my code...

Thank you,
Best Regards,
Caio Costa