473,952 Members | 12,488 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving in SQL db data from Calendarextende r and Maskededitexten der

Hello, I'm trying to save data from textboxes that are connected to a
calendarextende r and masketeditexten der 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 telecomunicacio nes 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="TxtFechaRec ibo" runat="server" Style="position : static"
Width="70px"></asp:TextBox>

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

<cc1:CalendarEx tender ID="CalendarExt ender1" runat="server"
TargetControlID ="TxtFechaRecib o" PopupButtonID=" btndate">

</cc1:CalendarExt ender>
*************** *************** *************** *************** *************** *************** *************** *************** *************** **********

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

<cc1:MaskedEdit Extender ID="MaskedEditE xtender1" runat="server"
TargetControlID ="TxtCOP"

Mask="9,999,999 ,999"

MaskType="Numbe r"

InputDirection= "RightToLef t"

DisplayMoney="L eft"

AcceptNegative= "None">

</cc1:MaskedEditE xtender>

How can I solve this?

Oct 27 '08 #1
1 3036
egsdar explained :
Hello, I'm trying to save data from textboxes that are connected to a
calendarextende r and masketeditexten der 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 telecomunicacio nes 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="TxtFechaRec ibo" runat="server" Style="position : static"
Width="70px"></asp:TextBox>

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

<cc1:CalendarEx tender ID="CalendarExt ender1" runat="server"
TargetControlID ="TxtFechaRecib o" PopupButtonID=" btndate">

</cc1:CalendarExt ender>
*************** *************** *************** *************** *************** *************** *************** *************** *************** **********

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

<cc1:MaskedEdit Extender ID="MaskedEditE xtender1" runat="server"
TargetControlID ="TxtCOP"

Mask="9,999,999 ,999"

MaskType="Numbe r"

InputDirection= "RightToLef t"

DisplayMoney="L eft"

AcceptNegative= "None">

</cc1:MaskedEditE xtender>

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
6735
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 code ?? thank you Pedro Leite From Portugal ------------------------------------
1
8221
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 at the appropriate textbox. Is there anything I am missing. I saw the video in CODEPLEX and its seems like I have done the same setup like them. It gives me the feel of a textbox when you configure the enable properties to false. I can not...
0
1794
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 them to have to start at year 0001 and scroll all the way forward to 2007.
0
1561
by: smnbss | last post by:
Someone have solved the rendering problem that the CalendarExtender have in Safari? smnbss
0
1029
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 dropdown, the position of the subsequent DropDownExtender's DropDownControl changes from the bottom right to the Middle left. (The DropDownControl appears directly left of the TargetControl, rather than beneath the TargetControl.) How do I ensure the...
0
1584
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 situated on a modalpopup, the area where the calendar should appear shows the area below the modalpopup! That is, the area where the calendar should come up appears to be transparent (upto the level below the modalpopup). Please note that this happens...
0
1834
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 , focus will be set to next textbox automatically, means i want auto tabbed fields. for which i created java script function and associated it with OnKeyDown and OnKeyUp event of TextBox. but it's not working and when i remove the...
0
2650
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... before I save it to the db? (So the mask is just used for UI, not as part of the string)? Hope this makes sense... Thanks...
0
2431
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
10184
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
10003
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11614
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...
0
11213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9920
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...
0
7453
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6242
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
6367
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4570
muto222
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.