Can't See Added Columns In ASPNETDB.mdf
Sep 27, 2006
In developing a VWDE project I added 2 columns to the User table in the ASPNETDB.mdf database. I can see the columns in the Data Definition and I can see the values I added when I Show Table Data but I cannot access them with a SQLDataSource control? The SQLDataSource shows all of the columns in that table except the ones I added. Any suggestions? Thanks.
View 2 Replies
ADVERTISEMENT
Aug 7, 2006
When setting an output's "IsErrorOut" property to true, is it also possible to add additional columns to that error output?
I'd like to add a message beyond the standard errorCode and errorColumn columns, a column which is the "specific error message", not just a lookup on the errorCode.
IDTSOutput90 outError = ComponentMetaData.OutputCollection.New();
outError.Name = "Error Output";
outError.IsErrorOut = true;
// Add extra column here, e.g. ErrorMessage
View 7 Replies
View Related
Oct 19, 1999
I have a table on two different servers, the only difference that I can see is that on server A columns first (varchar 32) and last (varchar 32) have ANSI_PADDING set ON and on server B those columns are OFF. No idea why this is true: I didn't specify that the table be set up this way and they both followed similar creation/upgrade paths.
I execute "select last+first from <table>" on server A and the result looks like:
<last1> <first1>
<last2> <first2>
...
On server B I get
<last1><first1>
<last2><first2>
Now the docs say ANSI_PADDING has nothing to do with this behavior; in fact if I copy the data on server B to 2 new columns with ANSI_PADDING ON I get the same results. But that's the *only* thing that was different in syscolumns. What is causing the different output behaviors on these two servers? Thanks.
View 1 Replies
View Related
Jul 30, 2015
For each customer, I want to add all of their telephone numbers to a different column. That is, multiple columns (depending on the number of telephone numbers) for each customer/row. How can I achieve that?
I want my output to be
CUSTOMER ID, FIRST NAME, LAST NAME, TEL1, TEL2, TEL3, ... etc
Each 'Tel' will relate to a one or more records in the PHONES table that is linked back to the customer.
I want to do it using SELECT. Is it possible?
View 13 Replies
View Related
May 12, 2008
I am getting the error:
Cannot open database "aspnetdb" requested by the login. The login failed.
When I browse to my ASP.NET 3.5 LINQ web application on the IIS 6.0 server on Server 2003.
I imagine this is because while I granted SQL Server 2005 login and permissions to my database that the application stores its data in, I did NOT grant any rights to the service account the IIS Application Pool uses for its identity to the aspnetdb database on SQL Server which is where all my roles information is stored at.
My question is what are the MINIMUM permissions needed for this database so it can perform its roles related functions?
I'm using Windows Authentications with the SQL Role provider for authorization.
Thank you.
EDIT: I think I only need to open the aspnetdb database and add my login to the aspnet_Roles_FullAccess role. Is that correct?
View 2 Replies
View Related
Dec 13, 2007
Hello:
I am running into an issue with RS2k PDF export.
Case: Exporting Report to PDF/Printing/TIFF
Report: Contains 1 table with 19 Columns. 1 column is static, the other 18 are visible at the users descretion. Report when printed/exported to pdf spans 2 pages naturally, 16 on the first page, 3 on the second, and the column widths have been adjusted to provide a perfect page span .
User A elects to hide two of the columns, and show the rest. The report complies and the viewable version is perfect, the excel export is perfect.. the PDF export on the first page causes every fith column, starting with the last column that was hidden to be expanded to take up additional width. On the spanned page, it renders the first column on that page correctly, then there is a white space gap equal to the width of the hidden columns and then the rest of the cells show with the last column expanded to take up the same width that the original 2 columns were going to take up, plus its width.
We have tried several different settings to see if it helps this issue or makes it worse. So far cangrow/canshrink/keep together have made no impact. It is not possible to increase the page size due to limited page size selection availablility for the client. There are far too many combinations of what the user can elect to show or hide to put together different tables to show and hide on the same report to remove this effect.
Any help or suggestion on this issue would be appreciated
View 1 Replies
View Related
Nov 22, 2006
Hi! could you please check my code on adding record on my DB.. Im using SQL Server included on VWD.Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As String = "Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Request.mdf;Integrated Security=True;User Instance=True" Dim sqlcon As New Data.SqlClient.SqlConnection(con) Dim sqlcmd As New Data.SqlClient.SqlCommand("Insert into uRequest (eticket, ename, edept, edetails, ejobpend, edate) values (@eticket,@ename,@edept,@edetails,@jobpend,@edate)") sqlcon.Open() sqlcmd.Parameters.Add("@eticket", Data.SqlDbType.Char, 10).Value = "11-0010-06" sqlcmd.Parameters.Add("@ename", Data.SqlDbType.Char, 100).Value = User.Identity.Name sqlcmd.Parameters.Add("@edept", Data.SqlDbType.Char, 50).Value = DropDownList1.Text sqlcmd.Parameters.Add("@edate", Data.SqlDbType.DateTime).Value = Date.Now sqlcmd.Parameters.Add("@edetails", Data.SqlDbType.Text).Value = TextBox1.Text sqlcmd.Parameters.Add("@ejobpend", Data.SqlDbType.Text).Value = TextBox2.Text sqlcon.Close() End Sub I've check the Data on my DB but nothing has been added. nwy, how can u create a confirmation message if the record has been successfully added.Thanks and sorry for the trouble.
View 1 Replies
View Related
Dec 14, 2004
Not 100% sure how to do this so I would appreciate some directions. I have 2 tables, Systems and Contacts. A system can have 1 to infinite contacts and contact can have 1 to infinite systems. So I use a 3rd table Sys_Con to add the contact needed for each system.
Now my question is once I add the System and contact how do I know for sure which ContactID to add in my Sys_Con table? Because while I am doing this operation maybe someone can add an other contact. So is there a way for my store proc Add_Contact to return the contactID needed for my store proc Add_Sys_Con ?
TABLE Sys_Con
SystemID int
ContactID int
Table Contact
ContactID int Identity
ContactName
...
Table System
SystemID
...
View 3 Replies
View Related
Jul 23, 2005
hi i have a question how can i delete last added row. I have 2 tables .source and destination . I take a 1 row from source table , do someoperation on it and save to destination table . after succesfull written Iwant to delete added row from source table.. i'm using a coursors. the mainproblem is : is there any function to check which row was last added. Now Iam doing it using select * from destionation where (and necessaryconditions). but if destination table will be 100000000 rows for example ittakes too much time... Is there another possibility to do it ???please helpMarcin Wolkuwolku
View 2 Replies
View Related
Dec 12, 2003
I would like to retreive the identity field value of a record that was just added to the table.
In other words, I have a form and on submission, if it is a new record, I would like to know the identity value that the SQL Server has assigned it.
This may be overkill, but here is my code to process the form:
Protected Sub processForm(ByVal thisID As String, ByVal myAction As String)
Dim sqlConn As New SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
sqlConn.Open()
Dim sql As String
Select Case myAction
Case "save"
If thisID > 0 Then
sql = "update INCIDENT set " & _
"RegionID = @RegionID, " & _
"DistrictID = @DistrictID, " & _
"DateReported = @DateReported, " & _
..CODE...
"WHERE IncidentID = " & myIncidentID
Else
sql = "insert into INCIDENT(" & _
"RegionID, " & _
"DistrictID, " & _
"DateReported, " & _
...CODE...
") " & _
"values(" & _
"@RegionID, " & _
"@DistrictID, " & _
"@DateReported, " & _
...CODE...
")"
End If
Case "delete"
sql = "delete from INCIDENT where IncidentID = " & myIncidentID
Case Else
End Select
Dim sqlComm As New SqlCommand(sql, sqlConn)
sqlComm.Parameters.Add(New SqlParameter("@RegionID", SqlDbType.NVarChar))
sqlComm.Parameters.Add(New SqlParameter("@DistrictID", SqlDbType.NVarChar))
sqlComm.Parameters.Add(New SqlParameter("@DateReported", SqlDbType.NVarChar))
...CODE...
sqlComm.Parameters.Item("@RegionID").Value = ddRegionID.SelectedValue
sqlComm.Parameters.Item("@DistrictID").Value = ddDistrictID.SelectedValue
sqlComm.Parameters.Item("@DateReported").Value = db.handleDate(txtDateReported.SelectedDate)
...CODE...
Dim myError As Int16 = sqlComm.ExecuteNonQuery
'Response.Redirect("incident.aspx?id=" & )
End Sub
The response.redirect at the end of the sub is where I would like to put the identity field value.
View 6 Replies
View Related
Jan 4, 2006
How many triggers can be added in a table?
View 2 Replies
View Related
Jan 28, 2004
how do I position a newly added column in the table?
the default is at the very end.
what would I have to add to this code:
ALTER TABLE Vehicles
ADD Model varchar(55)
Thanks
View 2 Replies
View Related
Jan 8, 2008
Hi,
Is there a built in capability with sql server 2005 which sends emails to users upon a record insertion.
Thanks
View 2 Replies
View Related
Mar 30, 2008
is there a way to set up a scheduled sp to email me if no records are added to a certain table within the hour?
is this possible?
View 1 Replies
View Related
Jul 23, 2005
Here's the deal.I've been working on an Intranet application for my clients, and todayI went and installed the first prototype. It's a fairly standard thing- VS2003 ASP.NET/VB.NET on a SQL Server 2000 database.I restored the database onto their db server, and installed theapplication on their intranet server, and made the necessary changes tothe web.config and other configuration files.I logged on with no problem. The default form is a Search/Finder formwith no default recordset. I fired up the filter to return all therecords and the thing crashed. The filter form wouldn't get any data(there *was* data in the database - I checked that!). So I set a traceon the database and this is the SQL that was being sent to the server(note that this SQL is dynamically built and is being sent in-line):SET FMTONLY OFF; SET FMTONLY ON;SELECT fldID, fldReferenceNumber,fldRevision, fldPartNumber, fldIndentNumber, fldDescription,fldBatchNumber, fldCreatedDate FROM tblMyTable SET FMTONLY OFF;Note those SET FMTONLY OFF; SET FMTONLY ON;...SET FMTONLY OFF;directives. These direct SQL Server to return only metadata, and notdata rows. The SQL which SHOULD have been sent, and which I have justcaptured in the SQL Profiler on MY system here is:SELECT fldID, fldReferenceNumber, fldRevision, fldPartNumber,fldIndentNumber, fldDescription, fldBatchNumber, fldCreatedDate FROMtblMyTableWHERE (((tblMyTable.fldReferenceNumber LIKE N'%')))Again, note that the WHERE clause is missing from the first lot of SQL.Does anyone have any ideas about why this might be happening? I thinkit might have something to do with ownership/permissions, but Icouldn't find anything different about this database than the system onwhich this new application was modelled, which has no such problems.Edward
View 3 Replies
View Related
Oct 5, 2005
Hello all, i have a question i've beenk thinking for a little bit andcant seem to come up with a solution. What i want to do is add a uniquecounter to a resultset in query. For exampleSELECT ColumnA, ColumnB, ColumnC, ColumnDFROM AnyCombinationOfJoinsOrTablesWHERE SomeConditionIsTruewThe query above will produce a resultest of 4 columns.'A1', 'B1', 'C1', 'D1''A2', 'B2', 'C2', 'D2''A3', 'B3', 'C3', 'D3'......'An', 'Bn', 'Cn, 'Dn'Now what i want to do is add a unique identifier to every row. Theeasiest way would be to add a counter integer so the resultset wouldlook like1, 'A1', 'B1', 'C1', 'D1'2, 'A2', 'B2', 'C2', 'D2'3, 'A3', 'B3', 'C3', 'D3'......n, 'An', 'Bn', 'Cn, 'Dn'Is there a way to achieve this in T-SQL without using cursors.Thanks,Gent
View 3 Replies
View Related
Sep 14, 2007
I have a stored procedure that works fine in reporting services. It grabs the total of Yes's and No's by dates . But then i went ahead and added 2 more parameters to the proc, and now the totals are all wrong. I dont understand how that can mess everything up. Here is the previous stored proc, that gives the correct sum.
Code Snippet
ALTER PROCEDURE [dbo].[Testing_Questions_ALL_YESOrNO]
@Question char(80)
AS
BEGIN
SELECT
Qry_Questions.Question
, Qry_Questions.Date
, Qry_Questions.response
, B.Total
FROM Qry_Questions
INNER JOIN Qry_Sales_Group
ON dbo.Qry_Questions.sales_person_code COLLATE SQL_Latin1_General_CP1_CI_AS = dbo.Qry_Sales_Group.SalesPerson_Purchaser_Code
INNER JOIN
( Select COUNT(qq.response)as Total, Question, Date, response
FROM Qry_Questions qq
Where qq.response in ('Yes','No')
GROUP by qq.[Question] , qq.Date,qq.response ) B
ON Qry_Questions.Date = B.Date AND
Qry_Questions.Question =B.Question and
Qry_Questions.response=B.response
WHERE Qry_Questions.[Response Type]='YesNo' and Qry_Questions.Question=@Question
GROUP BY Qry_Questions.question,Qry_Questions.Date,Qry_questions.Response,B.Total
ORDER BY Qry_Questions.Question, Qry_Questions.Date
END
SET NOCOUNT OFF
Here is the edited version which only has two new parameters added to the proc. The edits are highlighted.
Code Snippet
ALTER PROCEDURE [dbo].[Testing_Questions_ALL_YESOrNO_Totals]
(@Region_Key int=null,@QuestionCode char(5),@Question char(80))
AS
BEGIN
SELECT
Qry_Questions.Question
, Qry_Questions.Date
, Qry_Questions.response
, B.Total
FROM Qry_Questions
INNER JOIN Qry_Sales_Group
ON dbo.Qry_Questions.sales_person_code COLLATE SQL_Latin1_General_CP1_CI_AS = dbo.Qry_Sales_Group.SalesPerson_Purchaser_Code
INNER JOIN
( Select COUNT(qq.response)as Total, Question, Date, response
FROM Qry_Questions qq
Where qq.response in ('Yes','No')
GROUP by qq.[Question] , qq.Date,qq.response ) B
ON Qry_Questions.Date = B.Date AND
Qry_Questions.Question =B.Question and
Qry_Questions.response=B.response
WHERE Qry_Questions.[Response Type]='YesNo'
AND REGION_KEY=@Region_Key
AND LEFT(Qry_Questions.[Question Code],2)IN (@QuestionCode)
AND Qry_Questions.Question=@Question
GROUP BY Qry_Questions.question,Qry_Questions.Date,Qry_questions.Response,B.Total
ORDER BY Qry_Questions.Question, Qry_Questions.Date
END
SET NOCOUNT OFF
View 6 Replies
View Related
Sep 19, 2007
Here is a new one for me. I added the /3GB switch to the boot.ini, restarted the server and now receive a number of messages when the OS tries to load.
Explorer.exe - Application Error
The application failed to initialize properly.
If I click OK the server sits on a blue screen with no information on the screen.
The other messages are the result of me trying to do anything within Task Manager, with the exception of rebooting the server. These messages make sense since Explorer.exe had a problem.
The server has the following configuration.
HP DL580
Windows Server 2003 Enterprise Edition - SP2
SQL Server 2000 Enterprise Edition - SP3a
14GB Memory
(4) dual core procs
PAE is enabled in the boot.ini
If I remove the /3GB the OS starts without a problem. Any suggestions?
Thanks, Dave
View 8 Replies
View Related
Jan 3, 2008
I'm running vb 2088 express with SQL express. I have limited VB and very limited SQL knowledge.
I have a VB app that inserts candidate data into the SQL table (called front) all works fine.
I now have a second VB app (separate from the above VB app) that runs at the same time; it does some extra work on the candidate data.
My question is when a new candidate is added to the SQL table, how I can get the second VB app to automatically know that a new record has been inserted (and the record key) and then start the VB subroutine.
I'm unsure if I should look at triggers or stored procedures (or something else) for this task.
Any help or pointers to additional resources would be appreciated.
Thank you!
TJ
View 7 Replies
View Related
May 15, 2007
I ran the code below that adds a column to an SQL table.
I refreshed Data Sources, but, the new column does not appear.
I refreshed Server Explorer and the new column does not appear.
I tried running the code again and I got:
"Column names in each table must be unique. Column name 'CaseNbr' in table 'Patient' is specified more than once."
so the column did actually get added, but, I can't see it.
Imports System.Data.SqlClient
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Try
Dim sqlConnection As New System.Data.SqlClient.SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Patient.mdf;Integrated Security=True;User Instance=True")
Dim str As String = "ALTER TABLE Patient ADD CaseNbr Varchar(50)"
Dim command As New System.Data.SqlClient.SqlCommand(str, sqlConnection)
sqlConnection.Open()
command.ExecuteNonQuery()
sqlConnection.Close()
'Catch
'End Try
Close()
End Sub
End Class
View 5 Replies
View Related
Nov 20, 2006
Hi All,
I have a createStudent SProc. When this is called it calls a createContact SProc. This in turn calls a Create Address Stored procedure. Now when I create the address, an Identity column automatically creates a new Identity for me. I need to return this value back to the calling stored procedure. I know how to return a value and all, however, how to I get the identity just entered (the corresponding identity) reliably? I know that select MAX <Identity> could suffice in this case, but is flawed as if someone was to add another object near the same time we could get the wrong identity returned...
Thanks heaps
Chris
View 6 Replies
View Related
Aug 2, 2007
I am using Reporting Services 2000 and therefore VS 2003 and am having a problem editing the T-SQL query in the data view of Visual Studio.
Basically if I manually edit the T-SQL query or touch anything in the designer view of the query I get odd characters added in the T-SQL and the query no longer works. I have tried re-installing VS2003 and RS 2000 but it's still happening.
FYI I also have SQLServer 2005 and VS 2005 on my machine as all applications we develop are in .Net 2.0 and 3.0. We only use VS2003 for RS.
Does anyone have a clue how to fix this? Thanks
View 3 Replies
View Related
Apr 14, 2005
Howdie y'all,
I'm quit new to SQL server and I'm getting there finally, but it's quit hard to find some good info on how to create stored procedures... But I've got the following one....
CREATE PROCEDURE [dbo].[spAddUser]@UserEmail VARCHAR(255),@UserPassword VARCHAR(16),@UserName VARCHAR(32)ASINSERT INTO [dbo].[tblUsers](UserEmail, UserPassword, UserName)VALUES (@UserEmail, @UserPassword, @UserName)GO
I actually would like to get value of the UserId column for the newly added record.
Can anyone of you folks help me with this?
Cheers,
Wes
View 4 Replies
View Related
Mar 15, 2006
For some reason, there are extra trailing spaces being added to all my
data as it is placed in the db. I am collecting information from,
processing a TRIM-like function in javascript, and then again in the
ASP.net code before it is being placed in the db.
The extra spaces are causing problems with my application.
Any help would be greatly appreciated.
View 3 Replies
View Related
Dec 9, 2002
We're replicating columns in a table from 7.0 server to SQL2k server. Once we've got the data on SQL2k, we were able to take advantage of DTS that was not available in version 7.0.
I recenlty added a column to the article and changed the DTS accordingly (transformation columns). However, I'm getting this error ever though I added the new column in the DTS.
-------
The number of columns in the bcp file does not match what is defined in the DTS package. Regenerate the package.
-----
I've recreated the package with no luck. This is becoming urgent as it's supposed to go into production soon.
Please help!!
Thanks,
Colleen
View 2 Replies
View Related
Nov 4, 2005
Is it possible to find out when a particular column was added to any table?
Thanks
View 1 Replies
View Related
Apr 11, 2006
i recorded a script for a change i need to make. actually 15 so far, i am getting ready to bring an access db with no pk or fk and only 1 relation over to ss05
my scripts are used to add the need pk fk to the tables and then move the data from the temptbl to the new one
1 thing i have been noticing is code like below will rename the table dbo.aMgmt.Employee and with that all the remaing lines of the script will fail.
DROP TABLE aMgmt.Employee
GO
EXECUTE sp_rename N'dbo.Tmp_Employee', N'aMgmt.Employee', 'OBJECT'
GO
any help?
View 2 Replies
View Related
Dec 31, 2007
I have a SQL database that gets populated by another program. Is there a way to determine when a new record is added to that database?
Thanks
View 4 Replies
View Related
Mar 26, 2008
Hi..
I created a publication on my server and I just clicked the box to include all of the stored procedures. If I add a new procedure, will that procedure also be included? Or will I have to modify the publication for each SP I create?
Thanks!
-Greg
View 1 Replies
View Related
Jul 23, 2005
I have a db that grew 8.2GB in one week and don't understand why.There are three tables added to the db daily. I calculated thespaceused by each of the three tables for a period of two weeks. Thetatal amount of data added to the db for the three daily tables overthe past two weeks was about 4MB yet the db grew approximately 8.2GB.WHY?Can someone please tell me what I should look at so that I canunderstand what is going on?
View 4 Replies
View Related
Jul 20, 2005
We are running into problems on our development environment with extraparameters being added on to a stored procedure call. Instead of theexpected stored procedure call, the trace shows something like this:declare @P1 intset @P1=NULL<<expected stored procedure call>> , @P1 output, <<repeat of firstthree sp parms>>select @P1The developer has checked the code, and I have checked the SP - bothseem to match what is in production (which works fine). The databasesare on the same server, and the apps are running on seperate webservers.I'm guessing this may be some sort of configuration issue with ADO,SQL, or something else - has anyone run into something similar tothis? Thanks!Dave
View 2 Replies
View Related
Jul 20, 2005
Can a new field be added to a table that already exists.Thanks in advance.
View 2 Replies
View Related
Jul 10, 2007
I am getting this error when clicking-through in Report Builder on a report using a report model as the data source -
An item with the same key has already been added.
I searched for the error but came up empty in the SSRS space. Does anyone out there know when this is generated and where I need to look in my model/properties to see what I have set incorrectly?
A little background/detail - It's a simple report against two fields (type & #count) in one entity (customer) in a (guessing here) medium sized model (~16 transactional/fact entities, ~40 lookup entities, ~15 what I am calling domain entities). The entity has 5 DefaultDetailAttributes, one Identifying. The report has 2 fields type (a lookup role) and #customers in the data area (so I can click it to test the click through). Then I click the # Customers to look at the detail for those X customers and after a long while and no queries against the DB (I have profiler running) I get this error.
Thanks in advance for the help.
View 1 Replies
View Related