Forms Data Controls :: Store Server Time On Insertion Of Record?
Sep 15, 2010
In my online web-application User is inserting new records and when user enters record system gets current datetime (using below query) and insert into table.
INSERT INTO Gponmig(Customer_Name, Contact_Mob_No, Sector, Plot, flat, Building_LandMark, Sr_No, Adsl_Acc_No, Del_Acc_No, Mig_Requirment, Reseller, Sales_Remarks, Userid, Dept, Date)
VALUES (@Customer_Name,@Contact_Mob_No,@Sector,@Plot,@flat,@Building_LandMark,@Sr_No,@Adsl_Acc_No,@Del_Acc_No,@Mig_Requirment,@Reseller,@Sales_Remarks,@Userid,@Dept,
GETDATE())
Problem:
User entered data at 12:27 PM but system recorded 12:27 AM.
I couldn't find why?
It is confirmed by the user that he didn't worked midnight.
Required:
The system should insert correct time.
View 5 Replies
Similar Messages:
Feb 25, 2011
Using SQL and C#. I have a gridview with a template field. I need to modify the some items in the gridview when the user selects a given record and store the values back in the database. ProjectID is the unique key in the database.Gridview is done as a table. How can I do it? Here is my grid view implementation.
[Code]....
View 3 Replies
Dec 31, 2010
I tried with no succcess doing a search here on the forum for some answers or pointers. So here goes.
I would like to Calculate total time from a records in a table.
the Table we'll call it "Time Table" may have four rows IE.
Field1 Field2
IN 08:00:00
OUT 12:30:00
IN 13:00:00
OUT 17:00:00
I am trying to display these records in a Child gridview with a total. Is there any SQL that can total time like this? or any other way I can total this?
View 7 Replies
Nov 12, 2010
I've got a DetailsView control on the page, which includes a FileUpload control. Both parts work individually e.g. I can upload a file and insert a record but what I'd like to be able to do is do both with one click - either on the Upload Buttton or on the Insert record text.
I have a button click event:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
But I'm not sure how to call the Insert Record event on the detailsView control.
View 6 Replies
Jan 26, 2011
I have one SqlDataSource control as DataSet with enable caching in one page aspx. Filtering is applied to this SqlDataSource control, so that the page always returns one record data.
My question: How to get the record data value from SqlDataSource control (one record data value) and store it as String variable?
View 3 Replies
Apr 1, 2011
What I want to do is to store new article and for each article choose a category..
I have 3 tables for example :
1. Article table : ArticleID - int , Article - nvarchar(max) .......
2. Categories table : CategoryID - int , CategoryName - nvarchar(150)
3. Article_Categories : ArticleCategoryID - int , ArticleID - int , CategoryID - int (And I set up relation in this table...)
I can store data into tables 1 and 2 that is working fine.. But I stuck with Table 3.
So far my code looks like this :
protected void Button1_Click(object sender, EventArgs e) //Add new Category (working fine)
{
string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
string insertSql = "INSERT INTO Categories(catname) VALUES(@catname)";
[code]....
View 9 Replies
Sep 1, 2010
I have the following tables:
1.) PRODUCT_INFORMATION
2.) CUSTOMERS
3.) DISTRIBUTORS
4.) PRODUCT_NAME
5.) CONTROLLER
Each table has a primary key assigned. The customers table has an ID column and a CUSTOMER_NAME column with unique index property set to avoid any duplication. How do I insert values in the product_information table that has a foreign key column from the CUSTOMERS table if we insert a value in the CUSTOMER_NAME field of the CUSTOMERS table. I want to know how can I create a join between all the tables so that when I insert values in individual tables they are joined with a serial number column in the PRODUCT_INFORMATION table?
View 1 Replies
Aug 9, 2010
Is it possible to add a date time picker to my form view? I use the form view to insert new records into a gridview connected to a Access database.
PS this is on a webpage don't know if that makes a difference
View 3 Replies
Aug 4, 2010
I am having real trouble at the moment trying to input NULL values into a field. what I want is, using VB, the ability to insert into parameters NULL values.
View 3 Replies
Sep 25, 2010
how to store only date into sql server 2008 from C# asp.net 3.5.
I want to store only date(like 26/05/1986) and only time (like 04:45:40 AM) into sql server 2008 .
I am using C# asp.net 3.5 as front end.But i am not getting how to convert datetime into only date and only time from front end application.
It should not be as a string from front end.it should be as a date type / time type.
I can not see only date or only time data type in VS 2008.
how to store only date or only time into sql server 2008 having only date or only time as a data type.
View 3 Replies
Feb 10, 2011
I want to store date and time into SQL server. Can I store it directly? For Instance
strDate = 28/02/2011
strTime = 09:30:55 pm
Then I used one variable to store all these.
strDateTime = strDate + " " + strTime
But it doesn't work for me
View 5 Replies
Jun 9, 2010
how to save record in GridView into SQL server?
View 5 Replies
Sep 4, 2010
have ui layerand i have two table for examlple1)Dept2)empin databasein ui layer i have seperate panels for insertion of dept fields, and emp fieldsi have two conditions apply sepreatly , here for insertion of two fields 1)if dept fields insertion faild i dont want to insert employee fields to insert in emp table2)if dept fileds insertion is sucsessfull and employee fields insertion fail i dont want to insert employee fields in employee table and i want to delete previously inserted dept row from dept tablehere no relation between two tables and here can i use transations
View 4 Replies
Jan 29, 2010
My insert is adding a record to the database in the call to the stored procedure in SQL Server, but a -1 is returned - Shouldn't it return 0 if the insert/update was successful?
Result = myCommand.ExecuteNonQuery();
View 3 Replies
Nov 16, 2010
I am using paging to my gridview (pagesize=4) . now i am in (X) page and i want to get (X+1) page top record or (X-1)page bottom record , how i can get .
View 2 Replies
Mar 21, 2011
I have a delete button bellow my gridview and I want a pop up to show when no record is selected and tell the user to first select a record. The button click event would show the pop up, but my gridview data blanks out.
Here is my code:
[Code]....
View 1 Replies
Oct 6, 2010
I want users to select a record in the GridView and then have that record open up in the Detailsview. How would I go about getting these two tools to communicate?
View 4 Replies
Aug 13, 2010
i have design a web application having suppliers table using SqlDatasource..
i have a master page in my design and other form are bound to a context menu..
Now i have displayed the records in the gridview..all i wanted is after i select a record in the gridview it will display the selected record in detailview from another aspx form..
i was able to create the link to another aspx form but the data that it display is the first data from the gridview not the data that i select.
View 3 Replies
Jul 6, 2010
i have one parent grid on which if user clicks a record ,the child details should get displayed on same page.
for example :
There is one department details table and employees table:
if user selects a record in department details grid,then employees in the selected department should get displayed in the next grid in the same page
View 2 Replies
May 7, 2015
How to insert particular row in gridview data into database table?
View 1 Replies
Apr 8, 2010
cvzzcvzzpublic partial class _Default : System.Web.UI.Page
View 4 Replies
Jun 15, 2010
I am selecting time from dropdownlist. and want to convert it in datetime and store it in database. When I am converting it to Datetime using following statement.
DateTime start_Time = Convert.ToDateTime(start_ts);
but it is showing as : date:12:00:00AM
View 7 Replies
Mar 27, 2011
I need to store time in database and then show in using gridview.I wonder how to store and show data so that user will see correct datetime depanding on his timezone?
View 6 Replies
Jan 24, 2011
I am working with asp.net 2008 and sql server 2005 . I get a situation where i have to delete data after 30 days. a suitable query how to do the same. I have go through different query but nothing going right for me.
View 2 Replies
Feb 14, 2011
I need rft server control not HTML based server controls to display and store text as well as images, from which i can get rtf text and can save it as it is in DB.
View 1 Replies