Showing posts with label mode. Show all posts
Showing posts with label mode. Show all posts

Monday, March 26, 2012

Reset tables

I

use Microsoft SQL Server and also I have several tables. One table has

ID like PK, and name. ID use autoincrement number mode, and now when I

want start form one but not from 156 or like that. I don't know how?

And also when I delete all data from table an run my apllication and

add something in table, it starts form last number, not from one.

Maybe can I do it from SQL menagement studio?

How I can reset table and start from 1?Make sure the table is empty or else this won't work. Go to SQL management studio. Go to modify table. Select the identity column. Look in the column properties window under identity specification. There you see the Identitiy Seed. Change the value (for instance to 2) and save it. Change it back to 1 and save is again. This should do the trick.|||Hi,

have a look in the BOL for the following command:

DBCC CHECKIDENT ('HumanResources.Employee', RESEED, 30)

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Wednesday, March 21, 2012

Reset autoincrement number

I use Microsoft SQL Server and also I have several tables. One table has ID like PK, and name. ID use autoincrement number mode, and now when I want start form one but not from 156 or like that. I don't know how? And also when I delete all data from table an run my apllication and add something in table, it starts form last number, not from one.

Maybe can I do it from SQL menagement studio?

How I can reset table and start from 1?Hi,

have a look in the BOL for the following command:

DBCC CHECKIDENT ('HumanResources.Employee', RESEED, 30)

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

One way to delete the data AND also reset the IDENTITY field is to TRUNCATE the table. (Check in Books Online, topic: Truncate.)

However, this may not be available if the table has PK-FK relationships with other tables.

|||Hmmm, but my table has PK-FK relationship. What now? Really I don't know how!|||If you want to truncate the table you will HAVE TO break the FK-PK first, othwerwise you will have to delete in the logical parent-child order.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Tuesday, February 21, 2012

ReportViewerControl and SSRS in Sharepoint Integration Mode

Hello,
We can embed server reports in .NET applications by using the ReportViewer
control.
Wondering if this still works when SSRS is running in Sharepoint integrated
mode and the reports in question are hosted within Sharepoint?
Thanks for any help,
JimHi I too have this same question. Now that I have my report server running
in integrated mode - I don't seem to see my report viewer/explorer web parts
any more...
"Jim Plant" wrote:
> Hello,
> We can embed server reports in .NET applications by using the ReportViewer
> control.
> Wondering if this still works when SSRS is running in Sharepoint integrated
> mode and the reports in question are hosted within Sharepoint?
> Thanks for any help,
> Jim|||ok - so the answer is yes - this does work - just needed some experimentation
with settings for the aspx page:
<ServerReport
ReportPath="http://<MyServer>/Documents/rptCountryTFLByIndustrySector.rdl"
ReportServerUrl="http://<MyServer>/ReportServer/"
/>
"TPazz" wrote:
> Hi I too have this same question. Now that I have my report server running
> in integrated mode - I don't seem to see my report viewer/explorer web parts
> any more...
> "Jim Plant" wrote:
> > Hello,
> >
> > We can embed server reports in .NET applications by using the ReportViewer
> > control.
> >
> > Wondering if this still works when SSRS is running in Sharepoint integrated
> > mode and the reports in question are hosted within Sharepoint?
> >
> > Thanks for any help,
> >
> > Jim