Solved

Default value won't insert on new row

Posted on 2008-06-17
2
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle Mulit-site configuration 28 73
Oracle Date 6 40
Create a Calendar table 29 43
DB Shutdown Automatically 11 32
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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…

732 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