I was wondering has anyone ever had a requirement to show the Primary Field Id value in a form when it Loads? I notice that in SQL Server there is no visible value assigned to the Primary column until you enter the data in all the fields and then move to the next row. Is this value stored somewhere internally so that I can show it on the webform to the user?
when i bind first time page (10) records then primary properly bind with records and when my next 10 records load using lazy loading then the primary key not change it shows 1st records primary key
check the below code in which i am assigning assetid (primary key) but its not assigning properly...
function OnSuccess(response) { //alert('testing'); var xmlDoc = $.parseXML(response.d); var xml = $(xmlDoc); pageCount = parseInt(xml.find("PageCount").eq(0).find("PageCount").text()); var customers = xml.find("AssetSummary");
In the database one number like a 91-9685748596 and, 2nd number like 9122-9685748596 and another one is 9685748596 .when we are try to formate it using substring function it all are may be9685748596,9685748596,9685748596.Mobile number is assigned as a primary key.so its showing error "Primary key violation".We can not the remove primary key also and there are 50 lack data in our database.
I want to show the admin pages only after logging in a form with username and password and also want to logout from the admin pages, if in the browser history select a admin page after logout it should not be shown
I installed Visual Web develperTrying to get a crystal report to show in the form but therte are no Crystal obhject to select Installed Visual Studio 2008 I can add an Item for Crystal now in form show the form and I see it has menu bar for crystal viewer and I see the report Now if I move the webpage to our server which has IIS 7.0, ASP.net 3.5 what else do I need to install on the server so it wil show the crystal report in the form?
I dont have primary key for Compaign Table CompaignId is Identity column. Now i want to use CompaignId in Employee Table because based on compaign user will retrieve employee data in Front end. Again Employee table doesn't have primary key. I am uploading excel file data to databse but in excel file there is no empNo so i cannot use primaryKey i have EmpName in excel file. How to solve this issue. How to use master table if possible create table structure for my requirements.
I am new to sql. I got this task to design a table in sql. It has for columns user_ID(PK, FK1) , WebSite_ID (PK, FK2), Create_Dt, Update_Dt How do I create PK and Fk1 and PK FK2 in sql server 2008 R2
I need to copy the records of a row to the next available row in the same table. I tried with "Insert ...Select " but it throws me a error since the pk is auto-increment. Also, i cant specify each and every column inside the insert...select statment cause i've almost 30 columns.
I am working on a database with about twenty tables. In one of the tables "Customers" their is a column with
a primary key. Call it "CustomerNumber".
The problem is that we log customers from multiple vendors and so we might have the same customer number, but from different vendors. So really this would be a perfect situation where we could set up the primary key to be a composite key consisting of the Vendor and CustomerNumber combination.
The integrity of the database is not very well maintained because the Primary Key CustomerId is never used as a secondary key in any of the other tables.
So here is my question. Instead of making a primary composite key, can I just drop the primary key all together?
This is one of those questions I really hate to ask, because typically I would never lean tword this drastic of a measure to solve a problem. Because of other situations I can't discuss this might be the best alternative. So would it be okay to drop the primary key constraint all together?
I am working with a sql 2008 server express database in asp.net. I have a table which I will call table 1. Table 1 has a primary key called Order_Id which is an int and automatically increments. After deleting all the records from Table 1, how can I reset the primary key Order_Id to zero again?
i get the following exception (missing primary key) in the line of using Find() method "Table doesn't have a primary key." I've rechecked the Database and all Primary Key columns are set correctly.
DataTable dt = p.GetAllPhotos(int.Parse(Id)); DataTable temp = new DataTable(); temp = dt.Clone(); temp = (DataTable)(Session["currentImage"]); DataTable dtvalid = new DataTable(); dtvalid = dt.Clone(); DataRow[] drr = new DataRow[1]; drr[0] = dt.Rows.Find((int.Parse(temp.Rows[0]["photoId"].ToString()))+1); foreach (DataRow dr in drr) { dtvalid.ImportRow(dr); } dtvalid.AcceptChanges();'
i have a bizar situation, i have a SSIS package which imports records from a flatfile.First i get rid of all the double records, so I keep only unique records before I put them into the desired table.I have put a dataviewer on the flow and notice that there are no duplicate records, and though the SSIS package fails with a violoation of a promary key constraint.Hs anyone seen this before? It is really strange.
am executing a query which gets the data from company and insert into the company_locations
query is :
insert into company_locations select company_id,address,city,state,country from company
company is having more records (around 200000 rows in table) so am giving the range like
insert into company_locations select company_id,address,city,state,country from company
where uid between 1 and 100000 --- worked fine and records are inserted
insert into company_locations select company_id,address,city,state,country from company
where uid between 100001 and 200000 ---- is giving the error
The Error is :
Could not allocate space for object 'dbo.company_locations'.'PK_company_locations' in database 'dbcurve1' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.