Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
generate Primary Key automaticaly
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
trouffiondesiles  
View profile  
 More options Nov 9, 7:59 am
From: trouffiondesiles <willignico...@gmail.com>
Date: Mon, 9 Nov 2009 04:59:59 -0800 (PST)
Local: Mon, Nov 9 2009 7:59 am
Subject: generate Primary Key automaticaly
HI,

I have a problem when i add a row to my slq Server Database.

There is how i add this row :

                    DB.getSqlDataSet(RequeteAll, DataSetAll,
TableName)
                    Dim Primary_Key_Columns(0) As DataColumn
                    Primary_Key_Columns(0) = DataSetAll.Tables
(TableName).Columns("PKPlanning")
                    DataSetAll.Tables(TableName).PrimaryKey =
Primary_Key_Columns

                    ObjDataRow = DataSetAll.Tables(TableName).NewRow
                    'PrimaryKey = DB.GetNewPrimaryKey(DataSetAll,
"PKPlanning", TableName)
                    'ObjDataRow("PKPlanning") = 50
                    ObjDataRow("PKUser") = Item.PKUser
                    ObjDataRow("PKMonth") = Item.PKMonth
                    ObjDataRow("PlanningDay") = Item.PlanningDay
                    ObjDataRow("PKHoraire") = Item.PKHoraire

                    DataSetAll.Tables(TableName).Rows.Add(ObjDataRow)

 On the row.add i have an error that PKPlanning can't obtain a NULL
result.

The Colums PKPLanning is configured into PrimaryKey with
autoincrement.

Have somebody an answer for my problem??

(Sorry for my english i'm french...)

Bye, Nicolas.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raghupathi Kamuni  
View profile  
 More options Nov 10, 1:48 am
From: Raghupathi Kamuni <raghukam...@gmail.com>
Date: Tue, 10 Nov 2009 12:18:57 +0530
Local: Tues, Nov 10 2009 1:48 am
Subject: Re: [DotNetDevelopment] generate Primary Key automaticaly

Set AutoIncrement, AutoIncrementSeed, AutoIncrementStep properties for the
primary key column

With Primary_Key_Columns
  .DataType = System.Type.GetType("System.Int32")
  .ColumnName = "PKPlanning"
  .AutoIncrement = True
  .AutoIncrementSeed = -1
  .AutoIncrementStep = -1
End With

On Mon, Nov 9, 2009 at 6:29 PM, trouffiondesiles <willignico...@gmail.com>wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google