Re: Calling UniData subroutines via OLEDB
Steven, here is a simple VB test application. Set up qmilk or whatever in uci.config Private Sub cmdConnect_Click() On Error GoTo ErrorTrap Dim strConnect As String Dim sDSN As String, sAccount As String Dim sUser As String, sPword As String Dim time1 As Single, time2 As Single Set UADODB = New ADODB.Connection sDSN = qmilk sAccount = QMILK sUser = jak sPword = noddy time1 = Timer With UADODB '.Provider = Informix.UniOLEDB ' this worked under 9.6 .Provider = IBM.UniOLEDB strConnect = DATA SOURCE= sDSN ; _ Location= sAccount ; _ USER ID= sUser ; _ PASSWORD= sPword ; .CursorLocation = adUseClient .ConnectionString = strConnect .ConnectionTimeout = 50 .Open End With time2 = Timer - time1 lblConnect.Caption = Round(time2) seconds to connect txtResult.Text = connected Exit Sub ErrorTrap: MsgBox Error: Err.Number - Err.Description vbCrLf _ Source: Err.Source vbCrLf vbCrLf _ Unable to connect! Aborting. End Sub Private Sub cmdDisconnect_Click() On Error GoTo ErrorTrap UADODB.Close txtResult.Text = disconnected Unload Me Exit Sub ErrorTrap: MsgBox Error: Err.Number - Err.Description vbCrLf _ Source: Err.Source vbCrLf vbCrLf _ Unable to connect! Aborting. End Sub Private Sub Command1_Click() On Error GoTo ErrorTrap Set rstFiles = UADODB.Execute(SELECT SUPPLIER FROM MPSUPPLIER;) lstTables.Clear ' load a listbox If Not rstFiles Is Nothing Then rstFiles.MoveFirst Do Until rstFiles.EOF lstTables.AddItem rstFiles.Fields.Item(0) rstFiles.MoveNext Loop rstFiles.Close End If Set rstFiles = Nothing lstTables.ListIndex = 0 ' load a datagrid Set dgTest.DataSource = UADODB.Execute(SELECT SUPPLIER, NAME FROM MPSUPPLIER;) Exit Sub ErrorTrap: MsgBox Error: Err.Number - Err.Description vbCrLf _ Source: Err.Source vbCrLf vbCrLf _ Failure to execute! Aborting. End Sub jak - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 8:06 AM Subject: Calling UniData subroutines via OLEDB Hello We're struggling through the IBM documentation to figure out how to call a subroutine on UniData via OLEDB. (The OLDB.pdf) I'm hoping some one can point us in the direction of some additional documentation or code examples. I've begun searching in the archives, but only limited success so far. thanks in advance for any info. Steven Covey Senior Business Analyst JIA, Inc. (Jenkon) [EMAIL PROTECTED] -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Getting OLEDB ON XP with UV10.0 to work
Help ! Has anyone had any luck with the above ? I understand the only authorised version of UV10 on XP is 10.0.15 and i am on 10.0.10 however seems to works fine except oledb I am getting the following error messages which seem to suggest its a username/password problem Error 1997 Died in UCI::Connect() with SQLSTATE S1000, Native error:80011 Failure to login as remote user Source: IBM UniOLEDB Provider and Error 1999 Only the currently logged in user can connect to localhost Source: IBM UniOLEDB Provider uci.config is 0042: hsuv 0043: DBMSTYPE = UNIVERSE 0044: network = TCP/IP 0045: service = uvserver 0046: host = 127.0.0.1 the vb app is With UADODB '.Provider = Informix.UniOLEDB ' this worked under 9.6 .Provider = IBM.UniOLEDB strConnect = DATA SOURCE= sDSN ; _ Location= sAccount ; _ USER ID= sUser ; _ PASSWORD= sPword ; .CursorLocation = adUseClient .ConnectionString = strConnect .ConnectionTimeout = 50 .Open End With With a reference to UniOLEDB 1.0 Type Library This worked on NT/UV9.6 and i know it works on 2000 Thanks in advance jak -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Running total
Do you have anything for a multivalue counter with either an EVAL or ITYPE jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 7:49 AM Subject: RE: Running total Hi Ya, Quick way is to try: LIST CUST EVAL @1+1 CUST.NAME (This might be dependant on Release Level) Wish you luck. -Original Message- From: Shrestha, Prabhash [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 10:08 a.m. To: U2 Users Discussion List Subject: Running total Is there a way in UniQuery to create a virtual attribute that will print a running total of the number of items listed? For example: LIST CUST RUNNING_TOTAL CUST.NAME ID RunningCustomer Total Name... 111 1 Joe Jones 112 2 Sue Smith 223 3 Sally White Thanks. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Running total
Stewart try this, works for me in universe information flavour and on R83 1 D 2 15 3 MV name 7 A;NV 9R 105 from ye olde pick pocket guide version IV NV returns the number of the mulit-value being processed hows life at fauldings ? jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 1:02 PM Subject: RE: Running total Can you post the pick style dict, please. -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 12:59 To: U2 Users Discussion List Subject: Re: Running total Garth Thanks, but i was after something like an itemised list for each mv entry such as Field mv1 1 mv2 2 mv3 3 Field mv1 1 mv2 2 etc ive only ever been able to do it as a pick style dict item or as a subr jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 11:52 AM Subject: RE: Running total Well the quick and dirty way is: LIST CUST EVAL @1 + DCOUNT(CUST.NAME,@VM) CUST.NAME Above assumes CUST.NAME is multivalued. Unfortunately the Counter only shows per row and not per multivalued, but again it is only a quick and dirty. Hope this helps. -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 2:07 p.m. To: U2 Users Discussion List Subject: Re: Running total Do you have anything for a multivalue counter with either an EVAL or ITYPE jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 7:49 AM Subject: RE: Running total Hi Ya, Quick way is to try: LIST CUST EVAL @1+1 CUST.NAME (This might be dependant on Release Level) Wish you luck. -Original Message- From: Shrestha, Prabhash [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 10:08 a.m. To: U2 Users Discussion List Subject: Running total Is there a way in UniQuery to create a virtual attribute that will print a running total of the number of items listed? For example: LIST CUST RUNNING_TOTAL CUST.NAME ID RunningCustomer Total Name... 111 1 Joe Jones 112 2 Sue Smith 223 3 Sally White Thanks. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Running total
Stewart, tried that and all i get is the entry of 1 beside each multivalue instead of incrementing mv numbers. I am wondering if this is a information flavour thing. Tried it in HS.SALES and its the same problem The EVAL works though but its still the pick solution jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:04 PM Subject: RE: Running total Hi John, Faulding is good, we are owned by Mayne now. Just as per Ken's example here is the UV equvilant Top. : 0001: I 0002: mvfield.name;@NV 0003: MD0 0004: Count 0005: 3R 0006: M 0007: : I could not get it to work without using good old pick conversions for EVAL. EVAL @RECORDmvfld.no CONV A;NV EVAL OCONV('','F;mvfld.no;NV') Regards, Stewart -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 13:32 To: U2 Users Discussion List Subject: Re: Running total Stewart try this, works for me in universe information flavour and on R83 1 D 2 15 3 MV name 7 A;NV 9R 105 from ye olde pick pocket guide version IV NV returns the number of the mulit-value being processed hows life at fauldings ? jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 1:02 PM Subject: RE: Running total Can you post the pick style dict, please. -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 12:59 To: U2 Users Discussion List Subject: Re: Running total Garth Thanks, but i was after something like an itemised list for each mv entry such as Field mv1 1 mv2 2 mv3 3 Field mv1 1 mv2 2 etc ive only ever been able to do it as a pick style dict item or as a subr jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 11:52 AM Subject: RE: Running total Well the quick and dirty way is: LIST CUST EVAL @1 + DCOUNT(CUST.NAME,@VM) CUST.NAME Above assumes CUST.NAME is multivalued. Unfortunately the Counter only shows per row and not per multivalued, but again it is only a quick and dirty. Hope this helps. -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 2:07 p.m. To: U2 Users Discussion List Subject: Re: Running total Do you have anything for a multivalue counter with either an EVAL or ITYPE jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 7:49 AM Subject: RE: Running total Hi Ya, Quick way is to try: LIST CUST EVAL @1+1 CUST.NAME (This might be dependant on Release Level) Wish you luck. -Original Message- From: Shrestha, Prabhash [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 10:08 a.m. To: U2 Users Discussion List Subject: Running total Is there a way in UniQuery to create a virtual attribute that will print a running total of the number of items listed? For example: LIST CUST RUNNING_TOTAL CUST.NAME ID RunningCustomer Total Name... 111 1 Joe Jones 112 2 Sue Smith 223 3 Sally White Thanks. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Running total
Stewart, thanks, i agree with the D version but do not get the I type to work as you suggest can you confirm LIST CUSTOMER SMM.CNT SMM.ICNT displays the same data? I would really like the itype work so i can reuse a static field to get an incrementing date against each mv jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:34 PM Subject: RE: Running total John, I got the same result as you in HS.SALES However, this worked in HS.SALES against the customer file field 11 is the product id field. CT DICT CUSTOMER SMM.CNT SMM.DCNT 0001 D 0002 11 0003 A;NV 0004 Count 0005 3R 0006 M SMM.ICNT 0001 I 0002 OCONV(PRODID,'A;NV') 0003 MD0 0004 Count 0005 3R 0006 M it is still using pick conversion but they are valid conversions in D I type dictionaries. Stewart -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 14:19 To: U2 Users Discussion List Subject: Re: Running total Stewart, tried that and all i get is the entry of 1 beside each multivalue instead of incrementing mv numbers. I am wondering if this is a information flavour thing. Tried it in HS.SALES and its the same problem The EVAL works though but its still the pick solution jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:04 PM Subject: RE: Running total Hi John, Faulding is good, we are owned by Mayne now. Just as per Ken's example here is the UV equvilant Top. : 0001: I 0002: mvfield.name;@NV 0003: MD0 0004: Count 0005: 3R 0006: M 0007: : I could not get it to work without using good old pick conversions for EVAL. EVAL @RECORDmvfld.no CONV A;NV EVAL OCONV('','F;mvfld.no;NV') Regards, Stewart -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 13:32 To: U2 Users Discussion List Subject: Re: Running total Stewart try this, works for me in universe information flavour and on R83 1 D 2 15 3 MV name 7 A;NV 9R 105 from ye olde pick pocket guide version IV NV returns the number of the mulit-value being processed hows life at fauldings ? jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 1:02 PM Subject: RE: Running total Can you post the pick style dict, please. -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 12:59 To: U2 Users Discussion List Subject: Re: Running total Garth Thanks, but i was after something like an itemised list for each mv entry such as Field mv1 1 mv2 2 mv3 3 Field mv1 1 mv2 2 etc ive only ever been able to do it as a pick style dict item or as a subr jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 11:52 AM Subject: RE: Running total Well the quick and dirty way is: LIST CUST EVAL @1 + DCOUNT(CUST.NAME,@VM) CUST.NAME Above assumes CUST.NAME is multivalued. Unfortunately the Counter only shows per row and not per multivalued, but again it is only a quick and dirty. Hope this helps. -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 2:07 p.m. To: U2 Users Discussion List Subject: Re: Running total Do you have anything for a multivalue counter with either an EVAL or ITYPE jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 7:49 AM Subject: RE: Running total Hi Ya, Quick way is to try: LIST CUST EVAL @1+1 CUST.NAME (This might be dependant on Release Level) Wish you luck. -Original Message- From: Shrestha, Prabhash [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 10:08 a.m. To: U2 Users Discussion List Subject: Running total Is there a way in UniQuery to create a virtual attribute that will print a running total of the number of items listed? For example: LIST CUST RUNNING_TOTAL CUST.NAME ID RunningCustomer Total Name... 111 1 Joe Jones 112 2 Sue Smith 223 3 Sally White Thanks. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- u2-users mailing list
Re: Running total
Stewart, that will do nicely I can go home now jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 3:19 PM Subject: RE: Running total John, Try this for your itype SMM.CNT 0001 I 0002 @RECORD11 0003 A;NV 0004 Count 0005 3R 0006 M Stewart -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 15:14 To: U2 Users Discussion List Subject: Re: Running total Stewart, thanks, i agree with the D version but do not get the I type to work as you suggest can you confirm LIST CUSTOMER SMM.CNT SMM.ICNT displays the same data? I would really like the itype work so i can reuse a static field to get an incrementing date against each mv jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:34 PM Subject: RE: Running total John, I got the same result as you in HS.SALES However, this worked in HS.SALES against the customer file field 11 is the product id field. CT DICT CUSTOMER SMM.CNT SMM.DCNT 0001 D 0002 11 0003 A;NV 0004 Count 0005 3R 0006 M SMM.ICNT 0001 I 0002 OCONV(PRODID,'A;NV') 0003 MD0 0004 Count 0005 3R 0006 M it is still using pick conversion but they are valid conversions in D I type dictionaries. Stewart -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 14:19 To: U2 Users Discussion List Subject: Re: Running total Stewart, tried that and all i get is the entry of 1 beside each multivalue instead of incrementing mv numbers. I am wondering if this is a information flavour thing. Tried it in HS.SALES and its the same problem The EVAL works though but its still the pick solution jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 2:04 PM Subject: RE: Running total Hi John, Faulding is good, we are owned by Mayne now. Just as per Ken's example here is the UV equvilant Top. : 0001: I 0002: mvfield.name;@NV 0003: MD0 0004: Count 0005: 3R 0006: M 0007: : I could not get it to work without using good old pick conversions for EVAL. EVAL @RECORDmvfld.no CONV A;NV EVAL OCONV('','F;mvfld.no;NV') Regards, Stewart -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 13:32 To: U2 Users Discussion List Subject: Re: Running total Stewart try this, works for me in universe information flavour and on R83 1 D 2 15 3 MV name 7 A;NV 9R 105 from ye olde pick pocket guide version IV NV returns the number of the mulit-value being processed hows life at fauldings ? jak - Original Message - From: Mitchell, Stewart [EMAIL PROTECTED] To: 'U2 Users Discussion List' [EMAIL PROTECTED] Sent: Friday, April 02, 2004 1:02 PM Subject: RE: Running total Can you post the pick style dict, please. -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 12:59 To: U2 Users Discussion List Subject: Re: Running total Garth Thanks, but i was after something like an itemised list for each mv entry such as Field mv1 1 mv2 2 mv3 3 Field mv1 1 mv2 2 etc ive only ever been able to do it as a pick style dict item or as a subr jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 11:52 AM Subject: RE: Running total Well the quick and dirty way is: LIST CUST EVAL @1 + DCOUNT(CUST.NAME,@VM) CUST.NAME Above assumes CUST.NAME is multivalued. Unfortunately the Counter only shows per row and not per multivalued, but again it is only a quick and dirty. Hope this helps. -Original Message- From: John Kent [mailto:[EMAIL PROTECTED] Sent: Friday, 2 April 2004 2:07 p.m. To: U2 Users Discussion List Subject: Re: Running total Do you have anything for a multivalue counter with either an EVAL or ITYPE jak - Original Message - From: Garth Joubert [EMAIL PROTECTED] To: U2 Users Discussion List [EMAIL PROTECTED] Sent: Friday, April 02, 2004 7:49 AM Subject: RE: Running total Hi Ya, Quick way is to try: LIST CUST EVAL @1+1 CUST.NAME (This might be dependant on Release Level) Wish you luck