473,480 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Saving in SQL db data from Calendarextender and Maskededitextender

Hello, I'm trying to save data from textboxes that are connected to a
calendarextender and masketeditextender in my SQL db and it is doing it, the
problem is with the date and the money fields in the db.

This is my query colected from my form:

Insert into Propuesta (idprospecto, Objeto, fecharecibo, fechaentrega,
idusuario, idestado, presupuestocop, presupuestousd ) values ('1', 'esta es
la prueba para la empresa de telecomunicaciones de bogota, del sector publico
y con el id 1', 10/14/2008, 10/14/2008, 22222222, 1, '5.657', '123.456')

this is the data saved for the date and money and smallmoney fields:

01/01/1900 12:00:00 am for both and 5,6570 and 123,4560 for money and
smallmoney respectively.

This is the code:

<asp:TextBox ID="TxtFechaRecibo" runat="server" Style="position: static"
Width="70px"></asp:TextBox>

<img id="btndate" src="Images/date.png" style="position: static" />

<cc1:CalendarExtender ID="CalendarExtender1" runat="server"
TargetControlID="TxtFechaRecibo" PopupButtonID="btndate">

</cc1:CalendarExtender>
************************************************** ************************************************** *********************************************

<asp:TextBox ID="TxtCOP" runat="server" Style="position: static"
Width="121px"></asp:TextBox>

<cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server"
TargetControlID="TxtCOP"

Mask="9,999,999,999"

MaskType="Number"

InputDirection="RightToLeft"

DisplayMoney="Left"

AcceptNegative="None">

</cc1:MaskedEditExtender>

How can I solve this?

Oct 27 '08 #1
1 3000
egsdar explained :
Hello, I'm trying to save data from textboxes that are connected to a
calendarextender and masketeditextender in my SQL db and it is doing it, the
problem is with the date and the money fields in the db.

This is my query colected from my form:

Insert into Propuesta (idprospecto, Objeto, fecharecibo, fechaentrega,
idusuario, idestado, presupuestocop, presupuestousd ) values ('1', 'esta es
la prueba para la empresa de telecomunicaciones de bogota, del sector publico
y con el id 1', 10/14/2008, 10/14/2008, 22222222, 1, '5.657', '123.456')

this is the data saved for the date and money and smallmoney fields:

01/01/1900 12:00:00 am for both and 5,6570 and 123,4560 for money and
smallmoney respectively.

Do *not* write out the query (search for "sql injection"), but use
parameters to supply the values. Then you can use a DateTime or decimal
value directly, without string conversions.

Hans Kesting

>
This is the code:

<asp:TextBox ID="TxtFechaRecibo" runat="server" Style="position: static"
Width="70px"></asp:TextBox>

<img id="btndate" src="Images/date.png" style="position: static" />

<cc1:CalendarExtender ID="CalendarExtender1" runat="server"
TargetControlID="TxtFechaRecibo" PopupButtonID="btndate">

</cc1:CalendarExtender>
************************************************** ************************************************** *********************************************

<asp:TextBox ID="TxtCOP" runat="server" Style="position: static"
Width="121px"></asp:TextBox>

<cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server"
TargetControlID="TxtCOP"

Mask="9,999,999,999"

MaskType="Number"

InputDirection="RightToLeft"

DisplayMoney="Left"

AcceptNegative="None">

</cc1:MaskedEditExtender>

How can I solve this?

Oct 27 '08 #2

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

Similar topics

4
6697
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
1
8186
by: mickeybaez | last post by:
Hi, I am trying to get the maskededitextender in asp.net to work. It seems like it does not let me type in the box. I have the scriptmanager and also have the maskededitextender configured to point...
0
1762
by: HockeyFan | last post by:
Does anyone know how to have a default date for the CalendarExtender? I'd prefer that the textbox it is associated with, remain blank until the user actually clicks on it, but I also don't want...
0
1521
by: smnbss | last post by:
Someone have solved the rendering problem that the CalendarExtender have in Safari? smnbss
0
986
by: =?Utf-8?B?R3JlZyBQZXRlcnM=?= | last post by:
With Visual Studio 2008 ASP.NET, I am using an inline AJAX CalendarExtender, followed by an inline AJAX DropDownExtender that extends a label contol. After selecting a date via the calendar...
0
1533
by: =?Utf-8?B?UmFodWw=?= | last post by:
I have a web application in ASP.NET (in VS2008). We have used CalendarExtender Ajax control in a couple of pages in the application and it works fine. However, if the calendarextendar is...
0
1786
by: =?Utf-8?B?QWJoaQ==?= | last post by:
Hi All, i have 3 textboxes for area Code,phone number and Extention and each have MaskedEditExtender associated with it. i want that when the length of first text box reaches it's maxlength ,...
0
2619
by: Bobby Edward | last post by:
I am using the ajax maskededitextender to provide a phone number format template, like this: (000)000-0000 x0000 Is there any way that I can automatically strip out the parens, dash, etc......
0
2401
by: rote | last post by:
I can't seem to find a DayRender event in the ajax calendarextender. What i want to do is to disable dates on the calendar. Any ideas? Thx in Adv
0
7051
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,...
0
7054
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,...
0
7097
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6750
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...
0
6993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4794
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...
0
3003
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...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.