.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

how to start counting from 1 in automatic int increase field after delete table - sqlCE

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :
how to start counting from 1 in automatic int increase field after delete table ?
i have MEN table with 10 rows, if i delete the table (delete from MEN)
and if i insert new row - it start in 11.
how to start from 1  ?
thanks in advance
i work on sqlCE

View Complete Post

More Related Resource Links

how to start counting from 1 in automatic int increase field after delete table - sqlCE

how to start counting from 1 in automatic int increase field after delete table ?
i have MEN table with 10 rows, if i delete the table (delete from MEN)
and if i insert new row - it start in 11.
how to start from 1  ?
thanks in advance
i work on sqlCE

Automatic Workflow start through Excel


Dear all,

I have a SPD WF and I want to start it automatically by channging a value in a dropdown inside Excel.

Instead of going to Office button --> Workflows --> Start "Budget Approval", start the workflow by setting a value inside Excel (and maybe saving the file) to "Completed".



Can't perform Create, Update or Delete operations on 'Table(outbox)' because it has no primary ke



I'm a beginner in asp.net and I have some problem inserting data into sql server 2005 with linq.


my code is : 


        Dim Result As New SMS.SendResult
        If Result.status = 0 Then
            Label1.Text = "Your Message Sent Successfuly"
            Dim db As New IGSSDataContext
            Dim out As New outbox With {.ClientID = intRandomNumber, .From = User.Identity.Name, .TO = TextBox1.TabIndex, _
            .Time = Now, .Message = Message}
            out.ID = (ID)
            TextBox1.Text = ""

SQLCE table column DefaultValues don't show up in XSD Dataset designer

Using Visual Studio 2008 with SQL CE 3.5, I notice that default values in the creation scripts for the database tables are not reflected in the dataset designer XSD file.  For example, the following SQL script creates the non-nullable table column names "Content" with a default value of 'Image':    "Content" nchar(20) NOT NULL DEFAULT 'Image',But in the column properties of the dataset designer (XSD) panel, this column correctly shows up as non-nullable, but with a DBnull default value as follows:     Name: Content    Allow DBnull: False    DefaultValue: <DBnull>Am I missing something somewhere, or is this a VS bug?  Also, how do I get the XSD file to regenerate after schema changes in the database?  Sqlmetal doesn't do it.Thanks,    -BGood

Delete Record From Table A that Is Not In Table B

I have two tables; Table A id, name 101, jones 102, smith 103, williams 104, johnson 105, brown 106, green 107, anderson   Table B id, name, city, state 101, jones, des moine, Idaho 103, williams, Corvallis, Oregon 104, johnson, Grand Forks, North Dakota 105, brown, Phoenix, Arizona 107, anderson, New York, New York   I need to delete records from Table A that are not in Table B.  My front end is writen in .net and I am using Data Access Layer along with a Business Logic Layer for data interaction.   I have tried at least seven variations of joining, right outer join, left outer join resulting in wiping our the entire table or nothing at all; not to mention deleting the record that ought to remain and keeping the record that needs to be deleted!   In my BLL I tried to capture the rowsAffected for the deletion by using-without success. Dim rowsAffected As Integer = Adapter.ID_Deletion(ID) If rowsAffected = 1 Then Exit Function Else Return rowsAffected = 1 End If   Please help.   MsMe.

Use Sharepoint Calendar Start Time field in calculated column

I'm trying to limit the calendar view to current week using the Sharepoint defined field Start Time. However, when I display the serial number behind the Start Time it looks like it is actually giving me the serial number for the Created Date field. I believe it is because the appointment is reoccurring but I'm hoping there is a way around it. I created a new testdate field and manually entered the date and set those appointments as all day events however they are not reocurring appointments. The testdate returns the correct serial number however the start time returns an incorrect serial number. SerialNumber1=DATE(YEAR([Start Time]),MONTH([Start Time]),DAY([Start Time])) SerialNumber2=DATE(YEAR([testdate]),MONTH([testdate]),DAY([testdate])) Start Time  SerialNumber1 Testdate  SerialNumber2 8/31/2010 40420 8/31/2010 40421 8/31/2010* 40405    9/1/2010* 40405    9/2/2010* 40405    9/7/2010 40427 9/7/2010 40428 9/13/2010* 40405    9/14/2010 40434 9/14/2010 40435 9/14/2010* 40405    9/15/2010* 40405    *These are reoccurring appointments scheduled as all day events. The others were entered as one time appointments scheduled as all day events.

Display specific table from the start vs selecting from a list.

Hello all, I'm using VS2010, EF 4.0. I want to display a list view from a specific table from the start -instead of the standard default page that list all the tables. Any ideas are welcome. 

I have relation many to many - how can I delete records from intermediate table ?

I have tables: Books id title Authors id name BooksAuthors book_id author_id Entity Framework generated only models for tables Books and Authors in relation many to many. How can I delete from table BooksAuthors all records where book_id =5 ?

automatic insert data to mysql table

hi all,             Actually i need to transfer data from one table to another table in mysql with codition of Time.for example i need to transfer data at 10.00am when user login at 10.00am it must be insert into another data table.. if anybody know time control  please reply me..C#Thank You,Arunabathan.G

automatic transfer data from one table to another table in mysql.

Hi all,         i done one web application in this application i need to transfer the data from one table to another automatically when the time is 10.00PM. i need to write this function sepearte time function not in page load function.the user select any of page the data should be transfer from one to another without page load only using time control function.. if anybody know this ,please reply me.Thank You,Arunabathan.G

Splitting a memo field into lines and adding a value at the start of each line

I have one memo field which has a bunch of text in it. I want to update another memo field from the first one but i want to divide it into lines of 50 characters and put a carriage return at the end of each line and a string value (Note:) at the beginning of each line But I am not sure how to go about it. The text in the first field may have line breaks and carriage returns or it may not. So is there a way i can strip out anything like that first See example below Memo Field1 The quick brown fox jumped over the lazy dog. And the Dish ran away with the spoon, the little dog laughed to see such fun and the Cow fell of the wall Memo Field2 Note: The quick brown fox jumped over the lazy dog. And Note: the Dish ran away with the spoon, the little dog l Note: aughed to see such fun and the Cow fell of the wal Note: l   ideally it wouldn't cut words in half but I think I may be asking too much.   Is this possible?

importing table with Access "memo" field to SQL

I imported an access database using the DTS wizard, into SQL 2005. There is a field in one of the Access tables that is a memo field, filled with a bunch of text including linebreaks. After importing, the field is indicated as the nvarchar(MAX) datatype when I check in SQL Enterprise Manager. The text in that field is displayed without line breaks, both in EM and when viewed on a web page. I changed the datatype of that column to "text" and now can see line breaks when I hover over a value in that column while viewing the table data in Visual Studio 2010's Server Explorer.But when I display the data in a ListView, there are no linebreaks. When I view my TableAdapter in my dataset, there are no linebreaks either.I must be missing something here? Thanks. 

Field type Choice is not installed properly. Go to the list settings page to delete this field.

Has anyone received this error message and know how to deal with it? Field type  Choice  is not installed properly. Go to the list settings page to delete this field. I have received this error three times now, once when trying to add a 'List Definition From Content Type' in Visual Studio twice when trying to add from existing site columns in Sharepoint in the list settings and library settings from the ribbon from a list and a document library.

delete using boung field value inside grid view

I want to delete data using boung field value inside grid view, I am doing this...but it is not finding bound field value<asp:BoundField DataField="nsid" HeaderText="nsid" SortExpression="nsid" Visible="false" />protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)    {        string sid = GridView1.DataKeys[e.RowIndex]["nsid"].ToString();        SqlCommand cmdx = new SqlCommand("delete from blogreply where sid='"+sid+"'",con);        con.Open();        cmdx.ExecuteNonQuery();        con.Close();please anyone tell me how to find bound field value..

How can I get the cumulative sum of a field in a table

For Eg.   I have a table like gias given below: Name                  Amount ------------------------------ aaa                       10 bbb                      20   and I want an output like one given below on running SQL query or stored procedure Name                  Amount                  cumulative amount --------------------------------------------------------------------- aaa                       10                              10 bbb                      20                              30   can anyone plz help me on this

xml as text will not save in table field in some cases

I have a stored procedure that saves 4 fields into a data table named xml.  One of the fields is called xml, and is just a text field.  Usually, my sp properly stores the data, but occassionally the xml portion of my record is not stored.  It's on a remote server, so I'm having trouble hooking up a debugger to it, but I may have identified some charactoristics of the data in the cases where the data is not saving into the field.  I think it has a lot of "......."s mixed in with the xml.  I'm wondering if SQL could be identifying this as some kind of security threat.  Any thoughts would be super appreciated. 

CSS float tables only allowing row of tables start at table header

Hi,I have a page of tables which take in information from the user. I am trying to get the tables to float to the right so I have two rows of tables. But for some reason. Each row of tables starts together. So there is a gap on one of the sides before the next table. Any help would be really appreciated  The CSS is .tableColumnFormat{    padding-top: 3px;    padding-bottom:3px;        width: 180px;    }.labelFormat{    float: left;    padding-left: 5px;    text-align: right;    font-size: medium;    width:180px;    }.tableFormat{        background-color:White;    width: 450px;    border:solid 1.5px #38a7db;        float: left;    margin-bottom:10px;    margin-left:10px;    margin-right:10px;}.tableColumnFormat2{    float:left;        padding-left:5px;    }.headerFormat{    text-align: left;    padding-left: 10px;    color:White;    background-image:url('App_Themes/MasterTheme/Images/table_header_background3.gif');    }
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend