Solved

Default value won't insert on new row

Posted on 2008-06-17
2
226 Views
Last Modified: 2010-03-20
I have two default values on two columns. One is GetDate() the other is an integer (6). I am developing a visual basic form based on my database table. When I enter a new row, be it from the form or direct into the db table, the default values will not populate the table unless I re-run the ! SQL. Do I need to create a trigger and if so what is the code? The columns are currently set to NOT NULL.
0
Comment
Question by:teustace
2 Comments
 
LVL 11

Expert Comment

by:CMYScott
ID: 21808581
can you show the code you are using to insert the rows?
0
 

Accepted Solution

by:
teustace earned 0 total points
ID: 21808720
Well, from the front end, using Visual Studio it is just the basic CRUD event when I hit the Save button but nothing happens, (because it is expecting the two values that I have purposely omitted because I am wanting the db to fill them in for me.). When I try entering the data directly into my database it gives a red dot to tell me that "the row was successfully committed to the db however, a problem occurred when attempting to retrieve the data back. So it tells me to re-run the query again. Must be a bug, I guess....
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now