473,804 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

updating date in a recordset

m
hi all,

got an interesting problem:

im working with purchase orders and in detail line i have a date field.
so for example:
header line:
PO code: X123
PO value: 100
po date: 05/05/2004

detail lines:
line no.: 1
delivery date: 10/10/2004
value: 40

line no.: 2
delivery date:
value: 60

i want to update a date in a detail record by placing the value from
javascript calendar app into a hidden field...
so all i do is (asp side):

<form...

<input type="text" name="whatever" value='<%=somed ate%>'>
<a href="javascrip t:show_calendar ('document.inv. whatever',
document.inv.wh atever.value);" >

....form>

& that all works fine.

the problem arises if i want to use the app in a detail section
if a place the code against a line for detail then i have two text boxes
with the same name so the javascript does not work...

also if i do something like:

<input type="text" name="<%=counte r%>" value='<%=rsc(" invdat")%>'>
<a href="javascrip t:show_calendar ('document.inv. <%=counter%>' ,
document.inv.<% =counter%>.valu e);">

the code although it looks ok (when i do the View>source code in IE)
does not work.

the only crazy solution is to :

<%select case counter
case 1%>
<td>
<input type="text" name="a"
value='<%=rsc(" invddatr")%>'>
<img src="pics/cal.gif"
href="javascrip t:show_calendar ('document.invd etdet.a',
document.invdet det.a.value);" alt="Date"></a>
</td>
<%case 2%>
<td>
<input type="text" name="b"
value='<%=rsc(" invddatr")%>'>
<a src="pics/cal.gif"
href="javascrip t:show_calendar ('document.invd etdet.b',
document.invdet det.b.value);" alt="Date"></a>
</td>
....
....end select%>

but that is just stupid writing a possible line for every number of
counter!!!

is there a better way to do this?

regards

mi
Jul 22 '05 #1
2 1668
Try making the fieldname alphanumeric as you generate it rather than just
numeric.

<input type="text" name="dt<%=coun ter%>" value="<%=rsc(" invdat")%>">
<a href="javascrip t:show_calendar ('document.inv. dt<%=counter%>' ,
document.inv.dt <%=counter%>.va lue);">

also, is the first parameter of show_calendar supposed to be a string?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"m" <us*****@hotmai l.com> wrote in message
news:uE******** ******@TK2MSFTN GP10.phx.gbl...
hi all,

got an interesting problem:

im working with purchase orders and in detail line i have a date field.
so for example:
header line:
PO code: X123
PO value: 100
po date: 05/05/2004

detail lines:
line no.: 1
delivery date: 10/10/2004
value: 40

line no.: 2
delivery date:
value: 60

i want to update a date in a detail record by placing the value from
javascript calendar app into a hidden field...
so all i do is (asp side):

<form...

<input type="text" name="whatever" value='<%=somed ate%>'>
<a href="javascrip t:show_calendar ('document.inv. whatever',
document.inv.wh atever.value);" >

...form>

& that all works fine.

the problem arises if i want to use the app in a detail section
if a place the code against a line for detail then i have two text boxes
with the same name so the javascript does not work...

also if i do something like:

<input type="text" name="<%=counte r%>" value='<%=rsc(" invdat")%>'>
<a href="javascrip t:show_calendar ('document.inv. <%=counter%>' ,
document.inv.<% =counter%>.valu e);">

the code although it looks ok (when i do the View>source code in IE) does not work.

the only crazy solution is to :

<%select case counter
case 1%>
<td>
<input type="text" name="a"
value='<%=rsc(" invddatr")%>'>
<img src="pics/cal.gif"
href="javascrip t:show_calendar ('document.invd etdet.a',
document.invdet det.a.value);" alt="Date"></a>
</td>
<%case 2%>
<td>
<input type="text" name="b"
value='<%=rsc(" invddatr")%>'>
<a src="pics/cal.gif"
href="javascrip t:show_calendar ('document.invd etdet.b',
document.invdet det.b.value);" alt="Date"></a>
</td>
...
...end select%>

but that is just stupid writing a possible line for every number of
counter!!!

is there a better way to do this?

regards

mi

Jul 22 '05 #2
m
Mark, Many Thanks!!!


"Mark Schupp" <no****@nospam. com> wrote in message
news:ON******** ******@TK2MSFTN GP15.phx.gbl...
Try making the fieldname alphanumeric as you generate it rather than just
numeric.

<input type="text" name="dt<%=coun ter%>" value="<%=rsc(" invdat")%>">
<a href="javascrip t:show_calendar ('document.inv. dt<%=counter%>' ,
document.inv.dt <%=counter%>.va lue);">

also, is the first parameter of show_calendar supposed to be a string?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"m" <us*****@hotmai l.com> wrote in message
news:uE******** ******@TK2MSFTN GP10.phx.gbl...
hi all,

got an interesting problem:

im working with purchase orders and in detail line i have a date field.
so for example:
header line:
PO code: X123
PO value: 100
po date: 05/05/2004

detail lines:
line no.: 1
delivery date: 10/10/2004
value: 40

line no.: 2
delivery date:
value: 60

i want to update a date in a detail record by placing the value from
javascript calendar app into a hidden field...
so all i do is (asp side):

<form...

<input type="text" name="whatever" value='<%=somed ate%>'>
<a href="javascrip t:show_calendar ('document.inv. whatever',
document.inv.wh atever.value);" >

...form>

& that all works fine.

the problem arises if i want to use the app in a detail section
if a place the code against a line for detail then i have two text boxes
with the same name so the javascript does not work...

also if i do something like:

<input type="text" name="<%=counte r%>" value='<%=rsc(" invdat")%>'>
<a href="javascrip t:show_calendar ('document.inv. <%=counter%>' ,
document.inv.<% =counter%>.valu e);">

the code although it looks ok (when i do the View>source code in

IE)
does not work.

the only crazy solution is to :

<%select case counter
case 1%>
<td>
<input type="text" name="a"
value='<%=rsc(" invddatr")%>'>
<img src="pics/cal.gif"
href="javascrip t:show_calendar ('document.invd etdet.a',
document.invdet det.a.value);" alt="Date"></a>
</td>
<%case 2%>
<td>
<input type="text" name="b"
value='<%=rsc(" invddatr")%>'>
<a src="pics/cal.gif"
href="javascrip t:show_calendar ('document.invd etdet.b',
document.invdet det.b.value);" alt="Date"></a>
</td>
...
...end select%>

but that is just stupid writing a possible line for every number of
counter!!!

is there a better way to do this?

regards

mi


Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2058
by: Roy Adams | last post by:
Hi everyone I'm trying to build a shopping cart app using a db the part I'm stuck on is the fact that, if someone adds a product that they have previously added to the cart. I've got it set up to check whether the size and colour fields match what's in the db, if they do then you've already added this item with the same colours and size so, only update the quantity field, if they don't match, then insert a new record because the size and...
1
2594
by: Gerry Abbott | last post by:
Hi all, I've got two subforms on an unbound form, frmMain, frmSubOne, frmSubTwo. Ive got a control on frmSubTwo, cboList, a list box, which draws its source from the table underlying frmSubOne. I want this list to be kept automatically up to date, for selection, so after updating frmSubOne, the new records will be visible in the cboList box when selected.
2
3987
by: RBohannon | last post by:
I had some help on this one earlier, but I'm still having a bit of trouble. I'm sure it's something simple that I just don't know. I'm using Access2000. I have one table with employee salary information. I need to calculate the bi-weekly gross pay (BWG) for each employee. The BWG is slightly different for leap years. As the BWG will have to be adjusted at the beginning and end of every leap year, I want to be able to update all...
6
2408
by: Marlene | last post by:
Hi All I have the following scenario, where I have found all the duplicates in a table, based on an order number and a part number (item).I might have something like this: Order PODate Rec Qty Invoice# Item Supplier Status POReceivedDate 570133 03/09/2004 50 0 DMEDIUM L0010 PENDING 03/09/2004 570133 03/09/2004 50 0 DMEDIUM L0010 PENDING 03/09/2004 570133 03/09/2004 50 0 DMEDIUM L0010 PENDING 03/09/2004
2
3048
by: barret bonden | last post by:
(closest newsgroup I could find) Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. /asp_data3_add.asp, line 30 <% 'Dimension variables Dim adoCon 'Holds the Database Connection Object
5
3755
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional information: Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. It occurs when I attempt to add a new record. I've stripped out much of the code, leaving the pertinent (I hope) info. ...
9
1881
by: Kosmos | last post by:
Hey guys...the following code doesn't seem to work refering to the line It says the field is not updatable...I've never updated a table from a module before so I'm not sure if I am doing this right but the code is pasted below (the variable 'x' has nothing to do with anything as of now, it's something I will need later)(also no need to read the commentary it's more for my own purposes since this is still a learning experience for me):
3
1683
by: HSXWillH | last post by:
I've looked through the site and not found what I'm looking for here. I am not code-versed or anything like that so my skills are rudimentary at best. I'm using Access 03 on a Windows Vista environment. My question is about how to minimize data fields from large data-dumps in order to give myself the most recent recordset and to eliminate all older, out of date records. I have 7 bulk tables of data imported daily from a horse-racing text...
0
1229
by: mpande | last post by:
Hello Everyone I'm searching a database to find a value in the database and once the value is found, it should update the row corresponding with the productid, which is the PK in which I'm using to search the database. But I'm getting an error saying wrong number of arguments or invalid property assignment. My code looks like this: Do While Not rs.EOF If productid = rs!product_id Then Set updatedb = New ADODB.Connection updatedb.Open...
0
9711
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9166
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.