|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to insert data into an Access format file (.mdb) |
« View previous topic :: View next topic » |
Author |
Message
|
artykito |
Posted: Thu Aug 05, 2010 2:04 am Post subject: How to insert data into an Access format file (.mdb) |
|
|
Apprentice
Joined: 24 Jun 2010 Posts: 33
|
Hi all,
I have a requirement and I have no idea of how to do that.
I receive data from SAP and must to create an Access file (.mdb) inserting these data into it, but the problem is they told me this Access file is not possible to create like a .txt must be like if the file was a database. I know that Access is not a supported DB, that's because we must to create the file with that format.
It sounds rare for me, because I don't know how must I access to the fileto and how to create or insert the data into it. Also I've never worked before with Message Broker and databases...
I think I should add the file like a BD or something like that and use INSERT statement to create the tables, rows and data in the .mdb file, but I'm not sure if I must do that and how to do that...
I was reviewing the help but didn't find anything about this. Do you have an idea of how to do that or did you do this before?
Thanks for your help!
Last edited by artykito on Fri Aug 06, 2010 12:54 am; edited 1 time in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 05, 2010 10:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You need to go the JDBC / ODBC way.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
artykito |
Posted: Fri Aug 06, 2010 12:38 am Post subject: |
|
|
Apprentice
Joined: 24 Jun 2010 Posts: 33
|
I have created the Data Source for ODBC for my Access file as the help says with Microsoft Acces Driver (.mdb) controller.
The problem is I don't know how to access to the file from the Toolkit...because I can't add it like a database as specified the help, because it only allow me to create conections for: Oracle, DB2, Informix, SQL Server and Sybase.
So the question is, do you know how must I add my file to my database connections (if necessary) or how the file is imported to the Toolkit in order to configure it and access with esql?[/url] |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 06, 2010 1:02 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
artykito wrote: |
I have created the Data Source for ODBC for my Access file as the help says with Microsoft Acces Driver (.mdb) controller.
The problem is I don't know how to access to the file from the Toolkit...because I can't add it like a database as specified the help, because it only allow me to create conections for: Oracle, DB2, Informix, SQL Server and Sybase.
So the question is, do you know how must I add my file to my database connections (if necessary) or how the file is imported to the Toolkit in order to configure it and access with esql? |
Well I guess you meant this link http://publib.boulder.ibm.com/infocenter/wmbhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ah14442_.htm
(It won't work for everybody with the loopbak ip)
This describes the ODBC way. The easiest part however would be to use the JDBC driver and a java compute node... or a java procedure...
As an alternative you could connect to MSSQL and use the windows feature to reference mssql in access and export the data to msaccess, or just give them an msaccess project that references the MSSQL db for it's data access.
At some point I cannot but wonder what they want to do with msaccess and that data...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
artykito |
Posted: Fri Aug 06, 2010 2:13 am Post subject: |
|
|
Apprentice
Joined: 24 Jun 2010 Posts: 33
|
At first point, they want ESQL, so the Java way is not an option (at least this is the one and only way)
I don't know if you misunderstood me or viceversa. I have an empty .mdb file where I must put some data from SAP.
Like MS Access is not a DB supported by WMB, then that's the way they chose. I only need to fill this file and that's the point where I'm lost... they told me for fill the file I need to do like if it was a DB, is not possible to do as a simple .txt
You told me I need to connect MSSQL with MS Access, but I don't need access to MS Access (nice word trick)...even more, I don't have any data connections, only an empty file with .mdb extension. This is what I need to fill and put it in a folder. That's all.
Is this possible or have to do that with Java? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Aug 06, 2010 4:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
artykito wrote: |
Is this possible or have to do that with Java? |
By the time you've got this working with ESQL you could have got the Java working twice over.
Alternatively you can push back on this requirement & suggest that a) they should use a real database rather than Access or b) using the import feature in Access to convert the comma delimited txt file WMB can easily produce will be neither time consuming nor difficult. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Aug 06, 2010 4:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Right, so MS Access is not a supported DB. You need to stress this point with the people telling you to use it.
This means that the ESQL route *may* or *may not* work at all. You need to stress this point with the people telling you to use it.
The esql route consists of defining an ODBC datasource, and then using that Datasource on your compute node the same way you use any other datasource and then issuing an INSERT statement to create new data or an UPDATE or DELETE statement to change existing data or a SELECT statement to discover existing data.
As my esteemed colleagues say, however, using a CSV message format and creating a CSV file that can then be imported into Access very very simply is a more reliable approach, and generally just as quick.
A JDBC solution is also more reliable than the ODBC solution but may or may not be as quick and easy as the CSV solution. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|