Author |
Message
|
anandsitha |
Posted: Mon Aug 01, 2011 5:39 am Post subject: Database Connection using SQLServer 2005 |
|
|
Acolyte
Joined: 26 Jul 2011 Posts: 59
|
Hi-
I am doing one simple DB scenario in wmb.
my msgflow look like below
File Input Node ------>Database Node
I am going to insert one record to the SQL Server Database Table.
In My Table FirstName and LastName are the 2 Fields. Both are String.
and MY Input XML file would be
<Emp>
<EmpName>
<EFirstName>Satesh</EFirstName>
<ELastName>Kailasam</ELastName>
</EmpName>
</Emp>
Anyone please guide me to insert records in EMP table using both java Compute Statements and ESQL statement
Regards
Sithanandam.V |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Aug 01, 2011 5:44 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
you would use the esql INSERT statement.
or the JDBC equivalent.
Happy *learning*. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Aug 01, 2011 5:55 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
This guy seems passive aggressive to me. He refuses to use [ c o d e ] tags. What is it with him? _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
anandsitha |
Posted: Mon Aug 01, 2011 5:57 am Post subject: |
|
|
Acolyte
Joined: 26 Jul 2011 Posts: 59
|
Hi -
How to Use [Code ] Tages. Sorry I really dont know how to do it.
Regards
Sithanandam.V |
|
Back to top |
|
 |
anandsitha |
Posted: Mon Aug 01, 2011 5:59 am Post subject: |
|
|
Acolyte
Joined: 26 Jul 2011 Posts: 59
|
Hi mqjeff-
Could you please give me exact code for ESQL and JavaCompute. Also Explanation of how to proceed.
Regards
Sithanandam.V |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Aug 01, 2011 6:01 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
anandsitha wrote: |
Hi mqjeff-
Could you please give me exact code for ESQL and JavaCompute. Also Explanation of how to proceed.
Regards
Sithanandam.V |
Yes, I *can*.
I *will not*.
You are asking an extremely basic question that shows you have not had any training on this product.
It is *your* job to *learn* things. It is not *my* job to *teach* you.
Unless you'd like to hire me? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 01, 2011 6:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anandsitha wrote: |
How to Use [Code ] Tages. Sorry I really dont know how to do it. |
When you post, there are little buttons above the box you type in. Ever wondered about them?  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 01, 2011 6:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anandsitha wrote: |
Could you please give me exact code for ESQL and JavaCompute. Also Explanation of how to proceed. |
I certainly will. Once we've agreed how much I get as an hourly rate and where I send the invoice.
Seriously - someone is paying you to do this. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Aug 01, 2011 8:27 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Shhh. Don't tell anyone but Vitors rate is $200.00 per hour plus expenses.
Seriously, what you are asking is beginning to look more and more like basic interview questions. This is a definite in terms of getting answers here.
Putting on my interviewers hat,
Exactly how long have you been using Message Broker? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 01, 2011 9:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
smdavies99 wrote: |
Shhh. Don't tell anyone but Vitors rate is $200.00 per hour plus expenses.
|
Now I only said I'd do it that cheaply because I liked you.....
..... and clearly the expenses policy has to include the good coffee, all the single malt, at least 3 courses a night in a resturant of my choice, no less than 4 stars on the hotel...
... in fact just look at the bottom of the claim and pay it. Easier and safer.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Aug 01, 2011 10:54 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Do I really need to post the link to WM663 again? I think I've posted it twice or three times for this guy already.
Training ... !!  _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 01, 2011 11:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lancelotlinc wrote: |
I think I've posted it twice or three times for this guy already. |
I think you need to accept that, no matter how often you post the link (and no matter how justified it is), lessor mortals lack your ability to extract budget and/or policy changes from management.
I fear for your blood pressure. I also fear you'll slip back into your near-spamming habit....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Aug 01, 2011 2:17 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
anandsitha wrote: |
How to Use [Code ] Tages. Sorry I really dont know how to do it. |
For more details, click the hyperlink below.
rekarm01 wrote: |
Please put [code] tags around any posted code, to make it more readable.
Use the [Edit] button in the upper right corner of existing posts to fix them, and use the [Preview] button before submitting new posts, to make sure that they are readable. |
|
|
Back to top |
|
 |
anandsitha |
Posted: Tue Aug 02, 2011 2:31 am Post subject: |
|
|
Acolyte
Joined: 26 Jul 2011 Posts: 59
|
Hi- Am I Right?
My Message Flow will be
Input Node -------> Database Node
[color=orange][color=blue][b]FileInput Node
----Message domain - XMLNSC for XML Messages
----Message set - EmpMsg
Database
-----Data Source - DD(ODBC Connection name)
-----Statement - SimpleDbConnectESQL (ESQL code)
[/color][/color][/b]
Code: |
CREATE DATABASE MODULE SimpleDbConnectESQL
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
INSERT INTO Database.EmpContact(EName,ESalary,EDesignation)
VALUES(Root.XMLNSC.Emp.EmpContact.EName,
Root.XMLNSC.Emp.EmpContact.ESalary,
Root.XMLNSC.Emp.EmpContact.EDesignation);
RETURN TRUE;
END;
END MODULE; |
Regards
Sithanandam.V
Last edited by anandsitha on Tue Aug 02, 2011 4:05 am; edited 2 times in total |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Aug 02, 2011 2:57 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Did you read the last post by rekarm01? The one where he told you how to put code tags into your post?
Why not be a nice person and go back and edit your post? It is not difficult you know...
Until then...
Ok? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|