Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Monday, March 26, 2012

problem with aspnet_users

Hello,

I hope this is the right place to ask my question. I'm making an website as project for school it is ment to help students learn and practice physics. i wanted some additional info stored with the user data like in witch year the student is and wether or not he ad practiced a specified toppic. when u want to edit the gridview (in internet explorer) it gives the following error:

Server Error in '/pws_web' Application.

Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +177 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2305 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +147 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1021 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +314 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +413 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +115 System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +392 System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +643 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +78 System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +1218 System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +853 System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +87 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +117 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +86 System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +153 System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +172 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

I'm glad with every sugestion

Wrong datatype.

As a side note, that's what the profile system is for.

Tuesday, March 20, 2012

Problem while making Setup of Project

Hello friends,
While making a setup copy of my project I got the f errors in the following files-
i)d:\winnt\system32\crpe32.dll
ii)d:\winnt\system32\msvcrt.dll
iii)d:\winnt\system32\mfc42.dll
The error is-
The destination file is in use. Please ensure all other applications are closed. You have a chance to Abort, Retry, Ignore..If U ignore again the following message-
If U ignore, the file will not be copied and application may not run properly. Do U want to ignore.
ANother error I got was-
An error occured while registering d:\winnt\system32\msado20.tlb

Please let me know how to overcome these 4 errors...By the way I developed in VB6.0 and Oracle8i with Crystal Report 7.0 for reporting...O/S is Win 2000 Advanced Server..

Bye and Thanx...Hi,
When creating setup make sure that all the applications are closed. This may solve the first three problems. For the last problem, Use Microsoft ActiveX Data objects 2.0 library in the project.

Madhivanan|||Hai

I am also facing the same problem. but Mathi's solution does not solve the problem. The same problem exists again and again.

Anyone knows, help us.

Regards,

Velayudham.|||Hi Madhi,
Thanx for ur reply...But I tried both that u suggest...Even then it's still not workin...Any other suggestion...

Velayudham if U get the solution pl let me know...|||Hi

which version of Crystal Report are you using? Try to register those dlls.

For the last error try the following

In your package and deployment look for the file setup.lst then under the [Setup1 Files] section look for the entry of Msado20.tlb, make sure that the registration is set to TLBRegister instead of DLLSelfRegister. Package and deployment wizard causes this error, just change and save your setup.lst then re-install your package

Madhivanan|||Hi,

I had got a new installer. You can try this.

Use this link: http://www.jrsoftware.org/isdl.php

have a good day. Bye.|||Hello Madhi,
Still no working ya...Pl say some other way...

Velayudham,
Thanx... I'll try...|||Hi friends, pl help me-

I implemented a s/w in an organisation..It has win 2000 advanced server as o/s, oracle 8i as RDBMS, Front End in VB 6.0 and reporting in crystal report..

Now there are two tables service_usage_detail and invoice-detail. invoice-detail has a FK to service_usage_detail...

Bfore I could updated any service_name in the invoice_detail table, if the user does any mistake..But now I'm not being able to do the updation as it gives an eror message- Parent key not found Error no 2291...

By the way bfore the problem persists I did defragmentation and check (Scandisk I suppose) of all drives of the HDD from drive property's Tools tab...Out of the drives I skiped defragmentation half way on drive H:..I have noticed that the prob arises after that...

Friday, March 9, 2012

Problem when creating FK

Hello everyone,

I'm created a new SQL Server 2005 database for a new project and I'm facing a little situation regarding FKs. I guess that's what you get when you move from MySql 4 to Sql Server 2005 ;)

Here's the situation: I have a table called contact, assigned to the schema person, and that table handles all the base information regarding users. Informations such as FirstName, LastName, etc, are stored in the [Person].[Contact]. So far so good.

As a design decision I've decided to keep track of the nick names (Alias) that a given member had over-time. In order to do this I've designed the [Person].[GlobalAlias] table like this:

Id uniqueidentifier [NOT NULL] [PK]
ContactId uniqueidentifier [NOT NULL] [FK Person.Contact Id]
Alias nvarchar(30) [NOT NULL]
AddedByContactId uniqueidentifier [NOT NULL] [FK Person.Contact Id]
AddedDate datetime [NOT NULL]
AddedObs nvarchar(MAX) [NULL]
RemovedByContactId uniqueidentifier [NULL] [FK Person.Contact Id]
RemovedDate datetime [NULL]
RemovedObs nvarchar(MAX) [NULL]
ModifiedDate datetime [NOT NULL]
Status bit [NOT NULL]

This table seems to work great dispite the fact that it generates an error when I try to set the FKs. For the column [Person].[GlobalAlias] ContactId I set a FK to the column [Person].[Contact] Id with cascade on delete and on update. Now, when I go to the [Person].[GlobalAlias] AddedByMembershipId and try to add a FK to the column [Person].[Contact] Id it works as long as I define NO ACTION on delete and on update. Obviously, this could originate rows where the [Person].[Contact] that added a [Person].[GlobalAlias] was deleted and there's still a reference to that ID in the [Person].[GlobalAlias] AddedByMembershipId

Here's the error that I'm getting from the database:

'Contact (Person)' table saved successfully
'GlobalAlias (Person)' table
- Unable to create relationship 'FK_GlobalAlias_AddedByContactId_Contact_Id'.
Introducing FOREIGN KEY constraint 'FK_GlobalAlias_AddedByContactId_Contact_Id' on table 'GlobalAlias' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint. See previous errors.

How could I solve this? Perhaps the only way is to normalize it even further and create a history table?

Best regards,
DBA

That is pretty much what you appear to have now. Just that you are trying to set up foreign key relationships into it, which you probably shouldn't.

With a cascading delete, if you deleted someone, the delete would want to then cascade to every record in your GlobalAlias table that referenced them (Every alias they ever had, and any alias's they had ever created for someone else, or removed from someone else). That probably isn't what you wanted. I could see possibly wanting the updates to cascade, but you normally don't want users to be able to change their uid, so the FK really isn't all that useful for cascading updates.

Problem when adding ssis packages from microsoft visual source safe 6.0

I have created a integration services project on machine A and have added to visual source safe 6.0

When i try to take the project from source safe and store that on a different machine B i have a problem with it....

I check in everything on Machine A

When i try to add on machine B it tries to add it with "Name of package(1)" which means that its adding a copy.But it dosent do for all only for few

Could anyone let me know what the problem is?

Any time you see an unexpected "Name of package(1)" package added to you project, means the folder where the packages are stored already have a file with that name. Depending in how you do it, a file that is not part of the project may still exists in the folder. Use a windows explore to check what I am saying.

Problem when adding ssis packages from microsoft visual source safe 6.0

I have created a integration services project on machine A and have added to visual source safe 6.0

When i try to take the project from source safe and store that on a different machine B i have a problem with it....

I check in everything on Machine A

When i try to add on machine B it tries to add it with "Name of package(1)" which means that its adding a copy.But it dosent do for all only for few

Could anyone let me know what the problem is?

Any time you see an unexpected "Name of package(1)" package added to you project, means the folder where the packages are stored already have a file with that name. Depending in how you do it, a file that is not part of the project may still exists in the folder. Use a windows explore to check what I am saying.

Wednesday, March 7, 2012

Problem w/SqlDataAdapter in VB 2003 using SQLExpress

I am going through ADO.NET step-by-step and I tried the first project making a simple SqlDataAdapter and I get errors generating Update, Insert, and Delete statements. Any ideas? Should I just go back to MSDE using VB 2003?

Uriel

Dread Judge Forgive me!What errors are you getting?|||First, I should note that I am using the Northwinds DB that came with the book I am using. I add the SqlDataAdapter and the Wizard pops up. I added my connection. Choose Use SQL statements. I use the query builder to select several fields from one table, then click next. On the final page of the Wizard . I get the following:

The wizard detected the following errors when configuring the data adapter "SqlDataAdapter1".
"Symbol" - this is the symbol before the statements
"Check" Generated SELECT Statement
"Check" Generated Mappings
"Warning" Generated INSERT Statement
There were errors configuring the data adapter
"Warning" Generated UPDATE Statement
There were errors configuring the data adapter
"Warning" Generated DELETE Statement
There were errors configuring the data adapter

To apply these setting click finish.

There is no explanation of the errors and nothing that I can find to get an explanation. It allows you to go back and make changes, but I don't even know what's wrong.

Uriel

Dread Judge Forgive me!|||Any success? I'm getting the same thing, but for me it errors out creating the Select statement and doesn't even attempt the rest.

Problem w/SqlDataAdapter in VB 2003 using SQLExpress

I am going through ADO.NET step-by-step and I tried the first project making a simple SqlDataAdapter and I get errors generating Update, Insert, and Delete statements. Any ideas? Should I just go back to MSDE using VB 2003?

Uriel

Dread Judge Forgive me!What errors are you getting?|||First, I should note that I am using the Northwinds DB that came with the book I am using. I add the SqlDataAdapter and the Wizard pops up. I added my connection. Choose Use SQL statements. I use the query builder to select several fields from one table, then click next. On the final page of the Wizard . I get the following:

The wizard detected the following errors when configuring the data adapter "SqlDataAdapter1".
"Symbol" - this is the symbol before the statements
"Check" Generated SELECT Statement
"Check" Generated Mappings
"Warning" Generated INSERT Statement
There were errors configuring the data adapter
"Warning" Generated UPDATE Statement
There were errors configuring the data adapter
"Warning" Generated DELETE Statement
There were errors configuring the data adapter

To apply these setting click finish.

There is no explanation of the errors and nothing that I can find to get an explanation. It allows you to go back and make changes, but I don't even know what's wrong.

Uriel

Dread Judge Forgive me!

|||Any success? I'm getting the same thing, but for me it errors out creating the Select statement and doesn't even attempt the rest.

Monday, February 20, 2012

Problem using custom assemblies in SSRS2005

I've created a custom assembly (in VB (VS-2005)) for use in some SSRS2005
reports.
project: ReportsLibrary
Public Class ReportsCodeLibrary
Public Shared Function ReturnXML(MVList as Object, Root As String, Node As
String, Element As String) As String
Dim ReturnString = ""
Dim sParamItem As Object
ReturnString = "<" & Root & ">"
For Each sParamItem In MultiValueList
ReturnString &= "<" & Node & "><" & Element & ">" & sParamItem & "</"
& Element & "></" & Node & ">"
Next
ReturnString &= "</" & Root & ">"
Return (ReturnString)
End Function
Public Shared Function Format(s As String) As String
Format = left(s,4) & "-" & mid(s,5,2) & "-" & mid(s,7,3) & "-" &
right(s,4)
End Function
End Class
Each of these functions work properly if I put them in the Code section. But
since they are being used in multiple reports, I want to have the code in one
place and use that assembly.
The project is compiled in "Release" configuration.
I attach this compiled dll (ReportsLibrary.dll) to the report in the
Report's properties "Reference" section. Since these are Shared functions, I
don't need to define individual classes on that sheet.
When I get this working, I'll copy the dll to the SSRS ReportServer\bin
directory on the SSRS computer.
On the TextBox's (txtTableField2) Value property, I enter the expression
"=ReportsLibrary.ReportsCodeLibrary.Format(Fields!fieldName.Value)"
When I preview the report in Visual Studio, I get these errors:
[rsErrorLoadingCodeModule] Error while loading code module: â'ReportsLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullâ'. Details: Could not
load file or assembly 'ReportsLibrary, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' or one of its dependencies. The system cannot find the
file specified.
[rsCompilerErrorInExpression] The Value expression for the textbox
â'txtTableField2â' contains an error: [BC30451] Name 'ReportsLibrary' is not
declared.
So, what am I missing? What do I need to do to get this assembly to work
with SSRS?
Thanks,
WayneIs the .dll copied to the following folder on your development machine:
"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"?
--
Matt
"Wayne" wrote:
> I've created a custom assembly (in VB (VS-2005)) for use in some SSRS2005
> reports.
> project: ReportsLibrary
> Public Class ReportsCodeLibrary
> Public Shared Function ReturnXML(MVList as Object, Root As String, Node As
> String, Element As String) As String
> Dim ReturnString = ""
> Dim sParamItem As Object
> ReturnString = "<" & Root & ">"
> For Each sParamItem In MultiValueList
> ReturnString &= "<" & Node & "><" & Element & ">" & sParamItem & "</"
> & Element & "></" & Node & ">"
> Next
> ReturnString &= "</" & Root & ">"
> Return (ReturnString)
> End Function
> Public Shared Function Format(s As String) As String
> Format = left(s,4) & "-" & mid(s,5,2) & "-" & mid(s,7,3) & "-" &
> right(s,4)
> End Function
> End Class
> Each of these functions work properly if I put them in the Code section. But
> since they are being used in multiple reports, I want to have the code in one
> place and use that assembly.
> The project is compiled in "Release" configuration.
> I attach this compiled dll (ReportsLibrary.dll) to the report in the
> Report's properties "Reference" section. Since these are Shared functions, I
> don't need to define individual classes on that sheet.
> When I get this working, I'll copy the dll to the SSRS ReportServer\bin
> directory on the SSRS computer.
> On the TextBox's (txtTableField2) Value property, I enter the expression
> "=ReportsLibrary.ReportsCodeLibrary.Format(Fields!fieldName.Value)"
> When I preview the report in Visual Studio, I get these errors:
> [rsErrorLoadingCodeModule] Error while loading code module: â'ReportsLibrary,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullâ'. Details: Could not
> load file or assembly 'ReportsLibrary, Version=1.0.0.0, Culture=neutral,
> PublicKeyToken=null' or one of its dependencies. The system cannot find the
> file specified.
> [rsCompilerErrorInExpression] The Value expression for the textbox
> â'txtTableField2â' contains an error: [BC30451] Name 'ReportsLibrary' is not
> declared.
> So, what am I missing? What do I need to do to get this assembly to work
> with SSRS?
> Thanks,
> Wayne|||Matt,
Thanks! this took care of it. If only I had found this documented somewhere...
"Matt" wrote:
> Is the .dll copied to the following folder on your development machine:
> "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"?
> --
> Matt
>
> "Wayne" wrote:
> > I've created a custom assembly (in VB (VS-2005)) for use in some SSRS2005
> > reports.
> >
> > project: ReportsLibrary
> > Public Class ReportsCodeLibrary
> > Public Shared Function ReturnXML(MVList as Object, Root As String, Node As
> > String, Element As String) As String
> > Dim ReturnString = ""
> > Dim sParamItem As Object
> > ReturnString = "<" & Root & ">"
> > For Each sParamItem In MultiValueList
> > ReturnString &= "<" & Node & "><" & Element & ">" & sParamItem & "</"
> > & Element & "></" & Node & ">"
> > Next
> > ReturnString &= "</" & Root & ">"
> > Return (ReturnString)
> > End Function
> >
> > Public Shared Function Format(s As String) As String
> > Format = left(s,4) & "-" & mid(s,5,2) & "-" & mid(s,7,3) & "-" &
> > right(s,4)
> > End Function
> > End Class
> >
> > Each of these functions work properly if I put them in the Code section. But
> > since they are being used in multiple reports, I want to have the code in one
> > place and use that assembly.
> >
> > The project is compiled in "Release" configuration.
> > I attach this compiled dll (ReportsLibrary.dll) to the report in the
> > Report's properties "Reference" section. Since these are Shared functions, I
> > don't need to define individual classes on that sheet.
> > When I get this working, I'll copy the dll to the SSRS ReportServer\bin
> > directory on the SSRS computer.
> >
> > On the TextBox's (txtTableField2) Value property, I enter the expression
> > "=ReportsLibrary.ReportsCodeLibrary.Format(Fields!fieldName.Value)"
> > When I preview the report in Visual Studio, I get these errors:
> > [rsErrorLoadingCodeModule] Error while loading code module: â'ReportsLibrary,
> > Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullâ'. Details: Could not
> > load file or assembly 'ReportsLibrary, Version=1.0.0.0, Culture=neutral,
> > PublicKeyToken=null' or one of its dependencies. The system cannot find the
> > file specified.
> > [rsCompilerErrorInExpression] The Value expression for the textbox
> > â'txtTableField2â' contains an error: [BC30451] Name 'ReportsLibrary' is not
> > declared.
> >
> > So, what am I missing? What do I need to do to get this assembly to work
> > with SSRS?
> >
> > Thanks,
> > Wayne|||Hi Wayne,
You're right - I had to dig around in samples to find it. Difficult to
search on unless one knows to look for "Custom Report Item" in BOL.
Cheers,
Matt
"Wayne" wrote:
> Matt,
> Thanks! this took care of it. If only I had found this documented somewhere...
> "Matt" wrote:
> > Is the .dll copied to the following folder on your development machine:
> > "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies"?
> > --
> > Matt
> >
> >
> > "Wayne" wrote:
> >
> > > I've created a custom assembly (in VB (VS-2005)) for use in some SSRS2005
> > > reports.
> > >
> > > project: ReportsLibrary
> > > Public Class ReportsCodeLibrary
> > > Public Shared Function ReturnXML(MVList as Object, Root As String, Node As
> > > String, Element As String) As String
> > > Dim ReturnString = ""
> > > Dim sParamItem As Object
> > > ReturnString = "<" & Root & ">"
> > > For Each sParamItem In MultiValueList
> > > ReturnString &= "<" & Node & "><" & Element & ">" & sParamItem & "</"
> > > & Element & "></" & Node & ">"
> > > Next
> > > ReturnString &= "</" & Root & ">"
> > > Return (ReturnString)
> > > End Function
> > >
> > > Public Shared Function Format(s As String) As String
> > > Format = left(s,4) & "-" & mid(s,5,2) & "-" & mid(s,7,3) & "-" &
> > > right(s,4)
> > > End Function
> > > End Class
> > >
> > > Each of these functions work properly if I put them in the Code section. But
> > > since they are being used in multiple reports, I want to have the code in one
> > > place and use that assembly.
> > >
> > > The project is compiled in "Release" configuration.
> > > I attach this compiled dll (ReportsLibrary.dll) to the report in the
> > > Report's properties "Reference" section. Since these are Shared functions, I
> > > don't need to define individual classes on that sheet.
> > > When I get this working, I'll copy the dll to the SSRS ReportServer\bin
> > > directory on the SSRS computer.
> > >
> > > On the TextBox's (txtTableField2) Value property, I enter the expression
> > > "=ReportsLibrary.ReportsCodeLibrary.Format(Fields!fieldName.Value)"
> > > When I preview the report in Visual Studio, I get these errors:
> > > [rsErrorLoadingCodeModule] Error while loading code module: â'ReportsLibrary,
> > > Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullâ'. Details: Could not
> > > load file or assembly 'ReportsLibrary, Version=1.0.0.0, Culture=neutral,
> > > PublicKeyToken=null' or one of its dependencies. The system cannot find the
> > > file specified.
> > > [rsCompilerErrorInExpression] The Value expression for the textbox
> > > â'txtTableField2â' contains an error: [BC30451] Name 'ReportsLibrary' is not
> > > declared.
> > >
> > > So, what am I missing? What do I need to do to get this assembly to work
> > > with SSRS?
> > >
> > > Thanks,
> > > Wayne