ADO.NET Sql and default values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I am using MSDE in my application. I used MS Access to set default
values for the tables in the database. However, when I try to get a new row
from that table through ADO.NET, no default values has been fetched. Am I
doing something wrong?

Regards,
Alan
 
It depends on what you're doing. If you have default values specified in the
DB, adding a new row to the local database isn't going to include those
values unless you have an expression for them. Remember that you are
totally disconnected.
 
Sorry, I didn't make myself very clear. I used dataset to obtain the
structure of the table from the database which has the default values set.
Then, the connection is closed during user editing that row. The connection
will open again when user save the new row. So my question is: Is there a way
to obtain the default value from the table when I called newrow()?
 
Cor,

So does it mean I can never use the default values that I set in the
database through Access in ADO.NET? It will be a nightmare if I have to fill
in the defaults in my code.

Alan
 
Alan,
So does it mean I can never use the default values that I set in the
database through Access in ADO.NET? It will be a nightmare if I have to
fill
in the defaults in my code.

AFAIK is the answer yes.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top