Passing a String for Key1-GetByID for a UD Table

Thanks Rob- that first parameter is causing my pain, if I pass a 'converted from DateTime' string, properly formatted, it bombs. If I pass an 'assigned' string ( ie: string newdate = "01/01/2014"), no problems.

This is my conversion code:

string NewDueDateString = NewReqDate.ToString("MM/dd/yyyy");




________________________________
From: Rob Bucek <rbucek@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Friday, May 24, 2013 8:45 AM
Subject: RE: [Vantage] Passing a String for Key1-GetByID for a UD Table



Â
Correct sir, it was declared previously, I just didn’t include that snipet

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Bill Jackson
Sent: Thursday, May 23, 2013 4:03 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Passing a String for Key1-GetByID for a UD Table



Rob:

I'm guessing that your variable 'intDMRNum' is actually a string ?

________________________________
From: Rob Bucek <rbucek@...<mailto:rbucek%40dsmfg.com>>
To: "vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>" <vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>>
Sent: Thursday, May 23, 2013 4:43 PM
Subject: RE: [Vantage] Passing a String for Key1-GetByID for a UD Table



This isn't the only way to do it im sure but here is how ive run that in the past....

Dim adaptUD19 As UD19Adapter = New UD19Adapter(JobClosingForm)
adaptUD19.BOConnect()

Try
Dim recUD19 As Boolean = adaptUD19.GetByID(intDMRNum,intActnNum,"","","")

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Bill Jackson
Sent: Thursday, May 23, 2013 3:24 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Passing a String for Key1-GetByID for a UD Table

Hi Folks,
on Epicor 9.04.507A

In a customization, I'm trying to check on the existence of a record in our 'UD10' Table (we use key1 for Holidays, ie: 12/25/2013).

In a method within the customization, I pass the OrderRel.Reqdate:

Using the UD10 Adaptor, I convert this DateTime variable:

code:
********************************

string NewDueDateString = NewReqDate.ToString("MM/dd/yyyy");

UD10Adapter adUD10 = new UD10Adapter(oTrans);
adUD10.BOConnect();
*******************************

If I message it out, I verify that my string reads correctly (ie: "12/25/2013")

However, this line bombs out:

code:
****************************

bool boolFound = adUD10.GetByID( NewDueDateString, String.Empty, String.Empty, String.Empty, String.Empty );

***************************

I'm guessing something about the string is causing this.

If I set a string , such as:

code:
**************************
string mydate = "12/25/2013";
bool boolFound = adUD10.GetByID( mydate, String.Empty, String.Empty, String.Empty, String.Empty );

*************************

Works fine-I've tried manipulating the converted string, verified that the strings appear to be exact, etc.
just wondering fi I'm missing something simple..?,
thanks
Bill J.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]
Hi Folks,
 on Epicor 9.04.507A

In a customization, I'm trying to check on the existence of a record in our 'UD10' Table (we use key1 for Holidays, ie: 12/25/2013).

In a method within the customization, I pass the OrderRel.Reqdate:


Using the UD10 Adaptor, I convert this DateTime variable:

code:
********************************

string NewDueDateString = NewReqDate.ToString("MM/dd/yyyy");

UD10Adapter adUD10 = new UD10Adapter(oTrans);Â
adUD10.BOConnect();Â Â
*******************************

If I message it out, I verify that my string reads correctly (ie: "12/25/2013")

However, this line bombs out:

code:
****************************

bool boolFound = adUD10.GetByID( NewDueDateString, String.Empty, String.Empty, String.Empty, String.Empty );

***************************

I'm guessing something about the string is causing this.

If I set a string , such as:

code:
**************************
string mydate = "12/25/2013";
bool boolFound = adUD10.GetByID( mydate, String.Empty, String.Empty, String.Empty, String.Empty );

*************************

Works fine-I've tried manipulating the converted string, verified that the strings appear to be exact, etc.
just wondering fi I'm missing something simple..?,
thanks
Bill J.

[Non-text portions of this message have been removed]
This isn't the only way to do it im sure but here is how ive run that in the past....



Dim adaptUD19 As UD19Adapter = New UD19Adapter(JobClosingForm)
adaptUD19.BOConnect()

Try
Dim recUD19 As Boolean = adaptUD19.GetByID(intDMRNum,intActnNum,"","","")

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Bill Jackson
Sent: Thursday, May 23, 2013 3:24 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Passing a String for Key1-GetByID for a UD Table



Hi Folks,
on Epicor 9.04.507A

In a customization, I'm trying to check on the existence of a record in our 'UD10' Table (we use key1 for Holidays, ie: 12/25/2013).

In a method within the customization, I pass the OrderRel.Reqdate:

Using the UD10 Adaptor, I convert this DateTime variable:

code:
********************************

string NewDueDateString = NewReqDate.ToString("MM/dd/yyyy");

UD10Adapter adUD10 = new UD10Adapter(oTrans);
adUD10.BOConnect();
*******************************

If I message it out, I verify that my string reads correctly (ie: "12/25/2013")

However, this line bombs out:

code:
****************************

bool boolFound = adUD10.GetByID( NewDueDateString, String.Empty, String.Empty, String.Empty, String.Empty );

***************************

I'm guessing something about the string is causing this.

If I set a string , such as:

code:
**************************
string mydate = "12/25/2013";
bool boolFound = adUD10.GetByID( mydate, String.Empty, String.Empty, String.Empty, String.Empty );

*************************

Works fine-I've tried manipulating the converted string, verified that the strings appear to be exact, etc.
just wondering fi I'm missing something simple..?,
thanks
Bill J.

[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]
Rob:

      I'm guessing that your variable 'intDMRNum' is actually a string ?




________________________________
From: Rob Bucek <rbucek@...>
To: "vantage@yahoogroups.com" <vantage@yahoogroups.com>
Sent: Thursday, May 23, 2013 4:43 PM
Subject: RE: [Vantage] Passing a String for Key1-GetByID for a UD Table



Â
This isn't the only way to do it im sure but here is how ive run that in the past....

Dim adaptUD19 As UD19Adapter = New UD19Adapter(JobClosingForm)
adaptUD19.BOConnect()

Try
Dim recUD19 As Boolean = adaptUD19.GetByID(intDMRNum,intActnNum,"","","")

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Bill Jackson
Sent: Thursday, May 23, 2013 3:24 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Passing a String for Key1-GetByID for a UD Table

Hi Folks,
on Epicor 9.04.507A

In a customization, I'm trying to check on the existence of a record in our 'UD10' Table (we use key1 for Holidays, ie: 12/25/2013).

In a method within the customization, I pass the OrderRel.Reqdate:

Using the UD10 Adaptor, I convert this DateTime variable:

code:
********************************

string NewDueDateString = NewReqDate.ToString("MM/dd/yyyy");

UD10Adapter adUD10 = new UD10Adapter(oTrans);
adUD10.BOConnect();
*******************************

If I message it out, I verify that my string reads correctly (ie: "12/25/2013")

However, this line bombs out:

code:
****************************

bool boolFound = adUD10.GetByID( NewDueDateString, String.Empty, String.Empty, String.Empty, String.Empty );

***************************

I'm guessing something about the string is causing this.

If I set a string , such as:

code:
**************************
string mydate = "12/25/2013";
bool boolFound = adUD10.GetByID( mydate, String.Empty, String.Empty, String.Empty, String.Empty );

*************************

Works fine-I've tried manipulating the converted string, verified that the strings appear to be exact, etc.
just wondering fi I'm missing something simple..?,
thanks
Bill J.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]
Correct sir, it was declared previously, I just didn’t include that snipet

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Bill Jackson
Sent: Thursday, May 23, 2013 4:03 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Passing a String for Key1-GetByID for a UD Table



Rob:

I'm guessing that your variable 'intDMRNum' is actually a string ?

________________________________
From: Rob Bucek <rbucek@...<mailto:rbucek%40dsmfg.com>>
To: "vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>" <vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>>
Sent: Thursday, May 23, 2013 4:43 PM
Subject: RE: [Vantage] Passing a String for Key1-GetByID for a UD Table



This isn't the only way to do it im sure but here is how ive run that in the past....

Dim adaptUD19 As UD19Adapter = New UD19Adapter(JobClosingForm)
adaptUD19.BOConnect()

Try
Dim recUD19 As Boolean = adaptUD19.GetByID(intDMRNum,intActnNum,"","","")

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of Bill Jackson
Sent: Thursday, May 23, 2013 3:24 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Passing a String for Key1-GetByID for a UD Table

Hi Folks,
on Epicor 9.04.507A

In a customization, I'm trying to check on the existence of a record in our 'UD10' Table (we use key1 for Holidays, ie: 12/25/2013).

In a method within the customization, I pass the OrderRel.Reqdate:

Using the UD10 Adaptor, I convert this DateTime variable:

code:
********************************

string NewDueDateString = NewReqDate.ToString("MM/dd/yyyy");

UD10Adapter adUD10 = new UD10Adapter(oTrans);
adUD10.BOConnect();
*******************************

If I message it out, I verify that my string reads correctly (ie: "12/25/2013")

However, this line bombs out:

code:
****************************

bool boolFound = adUD10.GetByID( NewDueDateString, String.Empty, String.Empty, String.Empty, String.Empty );

***************************

I'm guessing something about the string is causing this.

If I set a string , such as:

code:
**************************
string mydate = "12/25/2013";
bool boolFound = adUD10.GetByID( mydate, String.Empty, String.Empty, String.Empty, String.Empty );

*************************

Works fine-I've tried manipulating the converted string, verified that the strings appear to be exact, etc.
just wondering fi I'm missing something simple..?,
thanks
Bill J.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]



[Non-text portions of this message have been removed]