Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Field

Status
Not open for further replies.

dataman86

Technical User
Oct 11, 2008
104
0
0
US
I have created a VB application which will keep track of call issues and post to a database setup in SQL Server 2005. I have databinded fields and I have combo box fields for Issues and Times. However, my date field, I want to default to the current date and post to the server. The current date is not posting to the server when the save button is clicked. DateTime type is setup for the SQL Server 2005, the current date loads each time the form loads but does not save the current date to the server.
What have I done wrong?

DataMan86
 

Try:
Code:
SELECT [blue]GETDATE()[/blue] AS CurrentDateTime
that will get you the date and time from your database.

Have fun.

---- Andy
 
Andrzejek,

I have a data entry form in VB. I just need to load the current date for a row to the database. Thats it. I know pretty much how to retrieve a date after it is in the datebase. I will pretty much load the combo boxes with drop down lists, but I want the data field to automatically load the current date by default so i won't have to type it in the box. I want the date to load to the database and post back when the save button is pressed. All of my fields are loading to the datbase fine, but the date is showing null on each row without a date in the fields.

Dataman86

 

So I guess you have some kind of INSERT statement in your app. Could you show this statement? And mark which field is the Date you have problem with.

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top