N
Nathan Kovac
A recent project I am working on is basically an interface to an sql
database. I have not done too much with sql databases from the c# area so I
am having to learn a few things. I am creating a simple example project
which is a simple form which interfaces a database table. It has a dropdown
to select which record to choose and several different data fields on each
selection. Thanks to MajorTom I was able to get this portion working great.
I have also gotten fields to update the sql server data source when I move
on to the next record.
My next goal is to insert a new record and allow it to be written back to
sql server. I discovered I can do this by adding a new row to the dataset.
But to add this new row I need to specify default values. Several of my
database fields are defaulted null. In this particular example I have a
list of tickets, each tickets has a project and subproject. The
subprojectID isn't required and therefore needs to default to null. But
null isn't an int data type. How do I do this or am I going about this the
wrong way?
Thanks,
Nathan
database. I have not done too much with sql databases from the c# area so I
am having to learn a few things. I am creating a simple example project
which is a simple form which interfaces a database table. It has a dropdown
to select which record to choose and several different data fields on each
selection. Thanks to MajorTom I was able to get this portion working great.
I have also gotten fields to update the sql server data source when I move
on to the next record.
My next goal is to insert a new record and allow it to be written back to
sql server. I discovered I can do this by adding a new row to the dataset.
But to add this new row I need to specify default values. Several of my
database fields are defaulted null. In this particular example I have a
list of tickets, each tickets has a project and subproject. The
subprojectID isn't required and therefore needs to default to null. But
null isn't an int data type. How do I do this or am I going about this the
wrong way?
Thanks,
Nathan