Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Friday, March 30, 2012

Invoking SSIS Packages from DotNet

Hi,

How can we invoke SSIS Packages from an Windows or ASP.NET Application (using C# ).

Thanks

Jegan

First you have a look at the documentation -

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/1a08c75e-ce8c-45ee-81bd-32248bbdb2b2.htm

or

Managing Packages Programmatically
(http://msdn2.microsoft.com/en-us/library/1a08c75e-ce8c-45ee-81bd-32248bbdb2b2.aspx)

Then you ask some specific questions if you get stuck.

|||

Darren ,

Thanks for the links. now i am able to create sample application.but when i am using Fuzzylookup and FlatFileDestination in my package and i am executing the package from a windows application (C#).i am getting the following errors

1.The product level is insufficient for component Fuzzy Lookup
2.The product level is insufficient for component Conditional Split
3.The product level is insufficient for component Flat File

what could be the reason .

Thanks

Jegan

|||

Fuzzy Lookup requires installation of SSIS from Enterprise Edition of SQL Server, for other components SSIS installation from Standard Edition is OK. You've probably only installed the Client/Workstation Componentss, not SSIS - so you can't run the packages.

For more details see http://msdn2.microsoft.com/en-us/library/aa337371.aspx

|||

Michael,

my machine already have SSIS installed and i am using VS 2005 Team Edition for Software Developers.so what could be the problem

Thanks

Jegan

|||Check if you have a service called MsDtsServer (display name SQL Server Integration Services).

If you do not have such service, you don't have SSIS installed. Installing just Workstation Components gives you access to some SSIS aspects, e.g. designing the packages in BIDS. But it is not enough to execute the packages outside of designer.

Invoking SSIS Packages from DotNet

Hi,

How can we invoke SSIS Packages from an Windows or ASP.NET Application (using C# ).

Thanks

Jegan

First you have a look at the documentation -

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9/html/1a08c75e-ce8c-45ee-81bd-32248bbdb2b2.htm

or

Managing Packages Programmatically
(http://msdn2.microsoft.com/en-us/library/1a08c75e-ce8c-45ee-81bd-32248bbdb2b2.aspx)

Then you ask some specific questions if you get stuck.

|||

Darren ,

Thanks for the links. now i am able to create sample application.but when i am using Fuzzylookup and FlatFileDestination in my package and i am executing the package from a windows application (C#).i am getting the following errors

1.The product level is insufficient for component Fuzzy Lookup
2.The product level is insufficient for component Conditional Split
3.The product level is insufficient for component Flat File

what could be the reason .

Thanks

Jegan

|||

Fuzzy Lookup requires installation of SSIS from Enterprise Edition of SQL Server, for other components SSIS installation from Standard Edition is OK. You've probably only installed the Client/Workstation Componentss, not SSIS - so you can't run the packages.

For more details see http://msdn2.microsoft.com/en-us/library/aa337371.aspx

|||

Michael,

my machine already have SSIS installed and i am using VS 2005 Team Edition for Software Developers.so what could be the problem

Thanks

Jegan

|||Check if you have a service called MsDtsServer (display name SQL Server Integration Services).

If you do not have such service, you don't have SSIS installed. Installing just Workstation Components gives you access to some SSIS aspects, e.g. designing the packages in BIDS. But it is not enough to execute the packages outside of designer.sql

Wednesday, March 28, 2012

Invalid value for key attachdbfilename.

HI,

We upgraded to SQL Server 2005 Standard Edition for our ASP.NET 2.0 website. We were using SQL Server Express 2005. That worked fine. Now we are unable to connect to the database. I have googled, but I just cann't figure out what is going on. Any help is appreciated. Here is the error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

In our firewall sqlbrowser.exe and sqlservr.exe are allowed.

Thanks Matt

Matt,

I have seen this error everytime I install MS SQL 2005, you need to enable TCP/IP as by default is not

Open the program -> SQL Server Surface Configuration

Go To -> Surface Area Configuration and Connections

Go To -> Remote Connections

and change Local Connections only to

Local and Remote connections

|||

AL,

Thank you for the quick reply. I did what you said and it was configured to,

Local and Remote Connections

Using both TCP/IP and named pipes,

already.

My databases reside inside my App_Data folder in my ASP.NET 2.0 application.

Do you have any other ideas?

Could it be my connection string?

Thank you again.

Matt

|||

Matt,

My biggest apologies, I jump to the answer as I have seen this message more than once. Again sorry.

If you already configured that, and you open all the ports on the firewall, I do not remember the port number but you can test from one computer to the other by opening a dos box and doing

telnet servername portnumber

If connects, you are good!! If does not ... open the port in the firewall

|||

Al,

Thank you again for helping me. I think that it is my fault. I don't think I have given you enough information about my situation.

I am trying to move my asp.net 2.0 website from sql server express to sql server 2005 standard edition.

So far all I have done is uninstall sql express and then installed sql server 2005.

I configured sql server 2005 with, what I assume to be the standard setup. I just used the wizard and did not change anything else. Those settings from the previous post were what was already checked when you told me to look at them. I did not set them.

I think from the little bit of research I have done, that I cann't use the AttachDbFile feature that sql express uses for sql server 2005?

At this point I am completely lost and frustrated. I am fairly new to this and trying hard to figure it out.

I do appreciate the help.

Any suggestion or ideas?

Thank You Again

Matt

|||

Actually attaching the database is the best solution. Also check on the logins after attaching that the username and password are correct. You can use VS2005 to connect to a database to see if that test works, there is a great wizard with great errors that might tell you what the problem is.

Besides that I am pretty lost, should work :-(

|||

Al,

Thank you for the help. I got it to work with one database. I used the wizrd and it worked great.

I also created a user in sql server 2005. I gave it a bunch of permissions just to get it to work. I think I should narrow thoses down to only the ones it needs.

My only other question is, I ran the aspnet_regsql.exe and it created a database in sql server 2005. But I was unable to use the ASP.NET Configuration tool to create roles and users. I made the same type of connection as with my other database. Error below.

The following message may help in diagnosing the problem:A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

Any ideas?

Thank You Again

Matt

|||When you use ASP.NET Configuration, make sure you give it a connection string that will work on the NEW DATABASE for users and roles. If you connect to the new database, you'll see the providers tab|||

Al,

Thanks again. I got it all working now. It was the connection string.

Thanks

Matt

|||

Did you figure it by going to ASP.NET Configuration?

Glad you fix it! Stick around!

|||

No, I worked through it on a post by scottgu. I had .mdf in my connectionstring. When I removed .mdf, it made the connection.

Thanks Matt

|||Ah! Mr Guthrie's blog is like a gold mine!

Monday, March 26, 2012

invalid row count

Hi,

I am building a shopping cart program, complete with an admin back end.
I am using ASP.NET, VB. NET and a SQL SERVER 2000 database.

The cart is working well... items can be added, updated and removed. However when trying to access the orders stored in the database from the admin section of the application, I am getting an "invalid record count" error.

I have no idea what this means. I've tried looking it up online, but so far no luck.

The orders are being stored in two tables connected via a foreign key.
I have no problem writing to the tables, it's just a problem reading the tables. I have dropped the two tables twice and rebuilt them, but I get the same error each time.

Any thoughts on what is causing this error?

Thanks,

-MichaelSince this is a sql server forum, maybe some sql would help...

Sounds more like an interface problem though.../|||Originally posted by Brett Kaiser
Since this is a sql server forum, maybe some sql would help...

Sounds more like an interface problem though.../

It is definitely starting to look more and more like an interface problem.
I just checked my SQL server logs and their are not database errors associated with this application.

Thanks,

Michaelsql

invalid object name..(my error message)

i'm working on an application using vs 2005, sql server2000, with c# asp.net

i can access many tables in my db that the dbo is the dbowner for them, but when i access few tables that the owner for them is dswebwork, i recieved an error says, invalid object name tbluser...which tbluser is table name...this is the error message in details....

Invalid object name 'tblUsers'.

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: Invalid object name 'tblUsers'.

Source Error:

Line 57: string passWord = txtPassword.Text;Line 58:Line 59: Users users = new Users(Constants.DB_CONNECTION,Line 60: userName, passWord);Line 61:


Source File:e:\web works\Webworks\DSCWebWorks\LoginMaster.master.cs Line:59

Stack Trace:

[SqlException (0x80131904): Invalid object name 'tblUsers'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +95 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +82 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +346 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3244 System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +52 System.Data.SqlClient.SqlDataReader.get_MetaData() +130 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +371 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1121 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +334 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +45 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +162 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +35 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +32 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +183 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +307 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +151 WebWorksBO.DBElements.BaseDataSQLClient.FillDataset(DataSet dsToFill) in C:\Development\MyWebWorks20\WebWorksBO\DBElements\BaseDataSQLClient.cs:97 WebWorksBO.DBElements.dbUsers..ctor(String connStr, String loginname, String loginpassword) in C:\Development\MyWebWorks20\WebWorksBO\DBElements\dbUsers.cs:38 WebWorksBO.AppElements.Users..ctor(String connStr, String loginname, String loginpassword) in C:\Development\MyWebWorks20\WebWorksBO\AppElements\Users.cs:370 LoginMaster.LoginUser() in e:\web works\Webworks\DSCWebWorks\LoginMaster.master.cs:59 LoginMaster.imgbtnOK_Click(Object sender, ImageClickEventArgs e) in e:\web works\Webworks\DSCWebWorks\LoginMaster.master.cs:46 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +102 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +141 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3840


so..i hope to help me...i need to deploy this project soon...

Append the owner to the table name, when you use it or change the owner to dbo

Select * from dswebwork.tblUsers

Invalid object name while reading data out of an SQL Database

Hi all,
I'm a complete newbie on ASP.Net.

I want to get some data out of a SQLserver Database running on my system with SQL Server 2005 Express. The name of the Database is 'tempdb' and the table is called "Members". the SQLServer runs as Local System with the Windows account.

When I try to open the site, I always get the same error:
Invalid object name 'Members'

I don't know what to do anymore. I read a post, where anybody set the rights for the owner, but my database is running with the Windows account.

Here is the Code of the page so far:

<%@. Page Language="VB" Debug="True" Strict="True" %>
<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SQlClient" %>
<script runat="server">
Sub Page_Load (ByVal Sender As Object, _
ByVal E As EventArgs)

Dim connStr As String
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;"
connStr += "database=tempdb;"
connStr += "Truster_Connection=yes"
Dim conn As New SQLConnection(connStr)
conn.Open()

Dim sql As String
sql = "SELECT COUNT (*) FROM Members"
Dim cmd As New SQLCommand(sql, conn)
Dim ergebnis As String
ergebnis = cmd.ExecuteScalar().toString()
Dim t As String
t = "Die Tabelle Members hat " & _
ergebnis & " Zeilen. <br>" & _
"Das Kommando lautet: " & _
cmd.CommandText & "<br>" & _
"Der Kommandotyp ist: " & _
cmd.CommandType

ausgabe.innerHTML = t

End Sub
</script>
<html><head><title>
Demo zu SQLCommand.ExecuteScalar
</title></head>
<body>
<h3>Demo zu SQLCommand.ExecuteScalar</h3>
<p runat="server" id="ausgabe" />
</body></html>

Thanks for your help an sorry for my english.

Greets
Flash_Prince

The problem is objects in tempdb is valid for limited time so your object the Member table does not exist. Microsoft provided the tempdb for SQL Server to be used to proccess complex queries and test queries so when you create a table if you did not drop it SQL Server will drop it at some point. Try the links below to download sample databases you can create and use with SQL Server 2005. The databases comes with tables but you can create your own tables so you can add the member table to any of the three database. Hope this helps.


http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en

http://www.microsoft.com/downloads/details.aspx?FamilyID=e719ecf7-9f46-4312-af89-6ad8702e4e6e&DisplayLang=en

|||

The problem is, that i want to use the database without entering the path of the database file in the sourcecode. When I use the nordwind database, all the sql queries are working very well. But if I use the Nordwind Database, I only know to connect by OleDB.

Can you tell me how to use a database in the way decribed above with a sql connection?

I hope, this is described understandable, cause my english is not the best.

|||

You need to create connection string and most of the information you need is covered in the two links below. Hope this helps.

http://www.connectionstrings.com

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000010.asp

|||The problem is in your connection string. You have a typo: "Truster_Connection=yes" should be "Trusted_Connection=yes".

Invalid object name sysperfinfo

When I execute this statement through ASP.NET

select cntr_value FROM sysperfinfo


I get this error,

System.Data.SqlClient.SqlException: Invalid object name 'sysperfinfo'.

Any ideas why?

It sounds to me like your connectionstring (the string that points to the database which you are querying) is pointing to a database that does not have a table entitled 'sysperfinfo'|||

To add to the previous post some things have changes about sysperfinfo. Try the links below for more. Hope this helps.

sysperfinfo

In SQL Server 2005,sysperfinfo returns abigint value for thecntr_value column. Modify applications that usesysperfinfo to make sure that they can handle thebigint values of thecntr_value column.

In SQL Server 2005,sysperfinfo is a compatibility view. You should use thesys.dm_os_performance_counters dynamic management view instead.


http://msdn2.microsoft.com/en-us/library/ms143179.aspx


http://www.sqlservercentral.com/columnists/jsack/troubleshootingsqlserverwiththesysperfinfotable.asp

|||

Maybe you're in the wrong database, try:

select cntr_value FROM master..sysperfinfo

Friday, March 23, 2012

INVALID OBJECT NAME Error

Hi All,
I am using ASP and SQL Server 2000 for an application. The problem that i am facing is that I get INVALID OBJECT NAME error. to be precise...
"Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E37)
Invalid object name '<table name>'"
the application runs for some days without any issues then suddenly it starts showing the error. When the error starts coming.. it appears in all the screens that were running without any issues just moments back. The only solution which works is to log o
ut of the application and login again.
Please suggest what could be the cause of the error...
If you need any more information just let me know...
Regards
Jaspreet
When you get the errors, check the connections to see what
database context is being used by the web clients. You can
capture this information in many ways such as with Profiler,
sp_who, sp_who2, querying sysprocesses, checking the Current
Activity node in Enterprise Manager, etc. It could be that
the database context is changing. You could also try fully
qualifying the object with database.owner.object in whatever
code you are using.
-Sue
On Sat, 5 Jun 2004 05:26:02 -0700, "Jaspreet"
<jaspreets@.ggn.hcltech.com> wrote:

>Hi All,
>I am using ASP and SQL Server 2000 for an application. The problem that i am facing is that I get INVALID OBJECT NAME error. to be precise...
>"Error Type:
>Microsoft OLE DB Provider for SQL Server (0x80040E37)
>Invalid object name '<table name>'"
>the application runs for some days without any issues then suddenly it starts showing the error. When the error starts coming.. it appears in all the screens that were running without any issues just moments back. The only solution which works is to log
out of the application and login again.
>Please suggest what could be the cause of the error...
>If you need any more information just let me know...
>Regards
>Jaspreet
|||Sue,
Thanx for your suggestion... I'll definitely check the context next time
the error occurs.
In my code, I have used database.owner.object in all the asp pages. Can
you give me an idea why this error could come.. so that in future I'd
take care of this issue.
Regards
Jaspreet
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
|||It's hard to say without knowing your app but you may want
to check the default database for the user this happens
with. Also If you change database context in any of the
stored procedures, queries, etc (e.g. with USE
SomeDatabase).
-Sue
On Tue, 08 Jun 2004 21:57:04 -0700, Jaspreet Sethi
<jaspreets@.ggn.hcltech.com> wrote:

>Sue,
>Thanx for your suggestion... I'll definitely check the context next time
>the error occurs.
>In my code, I have used database.owner.object in all the asp pages. Can
>you give me an idea why this error could come.. so that in future I'd
>take care of this issue.
>Regards
>Jaspreet
>*** Sent via Devdex http://www.devdex.com ***
>Don't just participate in USENET...get rewarded for it!

INVALID OBJECT NAME Error

Hi All,
I am using ASP and SQL Server 2000 for an application. The problem that i am
facing is that I get INVALID OBJECT NAME error. to be precise...
"Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E37)
Invalid object name '<table name>'"
the application runs for some days without any issues then suddenly it start
s showing the error. When the error starts coming.. it appears in all the sc
reens that were running without any issues just moments back. The only solut
ion which works is to log o
ut of the application and login again.
Please suggest what could be the cause of the error...
If you need any more information just let me know...
Regards
JaspreetWhen you get the errors, check the connections to see what
database context is being used by the web clients. You can
capture this information in many ways such as with Profiler,
sp_who, sp_who2, querying sysprocesses, checking the Current
Activity node in Enterprise Manager, etc. It could be that
the database context is changing. You could also try fully
qualifying the object with database.owner.object in whatever
code you are using.
-Sue
On Sat, 5 Jun 2004 05:26:02 -0700, "Jaspreet"
<jaspreets@.ggn.hcltech.com> wrote:

>Hi All,
>I am using ASP and SQL Server 2000 for an application. The problem that i a
m facing is that I get INVALID OBJECT NAME error. to be precise...
>"Error Type:
>Microsoft OLE DB Provider for SQL Server (0x80040E37)
>Invalid object name '<table name>'"
>the application runs for some days without any issues then suddenly it starts showi
ng the error. When the error starts coming.. it appears in all the screens that were
running without any issues just moments back. The only solution which works is to l
og
out of the application and login again.
>Please suggest what could be the cause of the error...
>If you need any more information just let me know...
>Regards
>Jaspreet|||Sue,
Thanx for your suggestion... I'll definitely check the context next time
the error occurs.
In my code, I have used database.owner.object in all the asp pages. Can
you give me an idea why this error could come.. so that in future I'd
take care of this issue.
Regards
Jaspreet
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!|||It's hard to say without knowing your app but you may want
to check the default database for the user this happens
with. Also If you change database context in any of the
stored procedures, queries, etc (e.g. with USE
SomeDatabase).
-Sue
On Tue, 08 Jun 2004 21:57:04 -0700, Jaspreet Sethi
<jaspreets@.ggn.hcltech.com> wrote:

>Sue,
>Thanx for your suggestion... I'll definitely check the context next time
>the error occurs.
>In my code, I have used database.owner.object in all the asp pages. Can
>you give me an idea why this error could come.. so that in future I'd
>take care of this issue.
>Regards
>Jaspreet
>*** Sent via Devdex http://www.devdex.com ***
>Don't just participate in USENET...get rewarded for it!

Invalid object name dbo.aspnet_SchemaVersions - what did I ever do to you?

environment: asp.net 2.0, vb, sql server 2000, windows server 2003.

Currently when I try to test to enter information through a CreateUserWizard this error pops up, I have checked my databases and I do have a aspnet_SchemaVersion there, I checked around the net and on the forums and I fixed any problems I thought could be causing it, I gave network services rights, as well as my sql server login, I have both a membership and a schemaversion table in the database.

I ran aspnet_regsql.exe to make a new target for my <forms> login, I just don't see what the problem is and can't seem to find anything out there that is the same as my problem. The following is the web.config:

<configuration>
<appSettings>
<add key="ConnectionString" value="DataSource=mew@.mew.com;UID=mew;pwd=mewmew" />
<add key="ConnectionString" value="Server=xxxxxxxxxx;database=customerlogin;UID=xxxxxxxxx;pwd=xxxxxxxx;Trusted_Connection=True" />
</appSettings>
<connectionStrings>
<add name="SqlServerConnection" connectionString="Server=xxxxxxxxxx;database=customerlogin;UID=xxxxxxxxxx;pwd=oni@.ichi;Trusted_Connection=True" />
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=xxxxxxxxxx;Integrated Security=SSPI;Initial Catalog=customerlogin;UID=xxxxxxxxx;pwd=xxxxxxxxx;Trusted_Connection=True" />
</connectionStrings>
<location path="secret">
<system.web>
<webParts>
<personalization defaultProvider="MyPersonalizationProvider">
<providers>
<membership defaultProvider="MyMembership">
<add name="MyMembership" type="System.UI.WebControls.WebParts.SqlPersonalizationProvider" connectionStringName="SqlServerConnection" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" requiresPassword="false" />
</membership>
</providers>
<authorization>
<deny users="?" />
</authorization>
</personalization>
</webParts>
<authentication mode="Forms" />
</system.web>
</location>
</configuration>

and this is the register.aspx page:

<%@. Page Explicit="true" debug="true" language="vb" %>
<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %>
<%@. Import Namespace="System.Data.Mail" %>
<%@. Import Namespace="System.Net.Mail" %>
<%@. Import Namespace="System.Web.Configuration" %>

<script runat="server">
Sub Page_Load()
If Not Page.IsPostBack Then
Dim dest As String = "~/Default.aspx"
If Not String.IsNullOrEmpty(Request.QueryString("ReturnURL")) Then
dest = Request.QueryString("ReturnURL")
CreateUserWizard1.ContinueDestinationPageUrl = dest
End If
End If
End Sub

Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As EventArgs)
CreateUserProfile(CreateUserWizard1.UserName, txtFirstName.Text, txtLastName.Text)
End Sub

Private Sub CreateUserProfile(ByVal userName As String, ByVal firstName As String, ByVal lastName As String)
Dim conString As String = WebConfigurationManager.ConnectionStrings("Test").ConnectionString
Dim con As New SqlConnection(conString)
Dim cmd As New SqlCommand("INSERT Test (UserName,FirstName,LastName) VALUES (@.UserName,@.FirstName,@.LastName)",con)
cmd.Parameters.AddWithValue("@.UserName", userName)
cmd.Parameters.AddWithValue("@.FirstName", firstName)
cmd.Parameters.AddWithValue("@.LastName", lastName)
Using con
con.Open()
cmd.ExecuteNonQuery()
End Using
End Sub

</script>

<html>
<head>
<title>Untitled Document</title>
</head>

<body>
<form runat="server" id="form1">
<asp:CreateUserWizard id="CreateUserWizard1" OnCreatedUser="CreateUserWizard1_CreatedUser" Runat="server" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" requiresPassword="false">
<WizardSteps>
<asp:WizardStep>
<asp:Label id="lblFirstName" Text="First Name:" AssociatedControlID="txtFirstName" Runat="server" />
<br>
<asp:TextBox id="txtFirstName" Runat="Server" />
<br>
<br>
<asp:Label id="lblLastName" Text="Last Name:" AssociatedControlID="txtLastName" Runat="server" />
<br>
<asp:TextBox id="txtLastName" Runat="server" />
</asp:WizardStep>
<asp:CreateUserWizardStep />
</WizardSteps>
</asp:CreateUserWizard>

</form>
</body>
</html>

The exact error with stack trace is below:

Invalid object name 'dbo.aspnet_SchemaVersions'.

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: Invalid object name 'dbo.aspnet_SchemaVersions'.

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): Invalid object name 'dbo.aspnet_SchemaVersions'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857242 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734854 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135 System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +367 System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +85 System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3612 System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +305 System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105 System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453 System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149 System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.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) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Any help is much appreciated, and thanks in advance.

How do you create the aspnet_SchemaVersions Table? did you use the tool come with VS? if not you have to verify all the table names, column names are type correctly. sepcially make sure your table name is "aspnet_SchemaVersions" not "aspnet_SchemaVersion"

Hope this help

|||I figured out the problem, I had changed the ownership of the table and apparantly the createuserwizard control doesn't like you to do that, so that generic error was the result.|||

I am sure this is the case when you are working on local server, on your own machine.

What if you have deployed working application to the ftp server say (godaddy), which has old version of SQL, SQL Server 2000?

I am facing this issue, the application works fine on local machine, but when it comes to godaddy, I have an error:

Invalid object name 'dbo.aspnet_SchemaVersions'.

How to set schema for godaddy or just modify application on local machine so that when uploaded it works on host server. Any views are welcomed.

Cheers

sql

Invalid object name 'db_student.myuser.tbl_studentname'.

HI, i am a newbie of SQL server.
What I got is an error shown as the title in which an ASP file made the SQL
call.
The script is just as follow:
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_cia_STRING
'Recordset1.Source = "SELECT * FROM fund WHERE studentno='k01' and remark
='confirm' ORDER BY date DESC"
Recordset1.Source = "db_aia..po_student_socre 'K01',' ',1"
Recordset1.CursorType = 1
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
I am sure that the procedure po_student_score exist and have set the execute
permission for the user with username myuser.
How can I solve the problem?
Thank you very much.
Hi,
First see the spelling of the procedure, the SCORE is spelled as SOCRE..
Recordset1.Source = "db_aia..po_student_socre 'K01',' ',1"
Thanks
Hari
MCDBA
<blue> wrote in message news:%231E%23aCUmEHA.1672@.TK2MSFTNGP14.phx.gbl...
> HI, i am a newbie of SQL server.
> What I got is an error shown as the title in which an ASP file made the
> SQL
> call.
> The script is just as follow:
> set Recordset1 = Server.CreateObject("ADODB.Recordset")
> Recordset1.ActiveConnection = MM_cia_STRING
> 'Recordset1.Source = "SELECT * FROM fund WHERE studentno='k01' and
> remark
> ='confirm' ORDER BY date DESC"
> Recordset1.Source = "db_aia..po_student_socre 'K01',' ',1"
> Recordset1.CursorType = 1
> Recordset1.CursorLocation = 2
> Recordset1.LockType = 3
> Recordset1.Open()
> I am sure that the procedure po_student_score exist and have set the
> execute
> permission for the user with username myuser.
> How can I solve the problem?
> Thank you very much.
>

'Invalid object name'

Dear all,
I've got an issue which to encompass both sql and vb and I can't work out.
I'm trying to retrieve data from an ASP page by ADO 2.6 and appears the
following error:
"
Microsoft OLE DB Provider for SQL Server error '80040e37'
Invalid object name 'GEN_VentDesp'.
/mtotgen/pruebas.asp, line 8
"
Snippet of code:
<%
set cnn=Server.CreateObject("ADODB.Connection")
ConectarBD(cnn)
sql = "SELECT * FROM GEN_VentDesp"
set rs = cnn.Execute(sql)
%>
I haven't idea why happens this. Moreover 'GEN_VentDesp' object exists on
the database (sql2k) and the user for that connection own the fine
permissions so that
I'm stuck..
Does anyone ever user or experienced this kind of error'
Thanks in advance,Could be few things. Check if you are connected to the database that
the objects exist in. Also check who owns the object. If the object
is not owned by the dbo and the object's owner is not the user that you
use in the connection string, then you need to specify the owner's name
as part of the object's name.
Adi|||Also check that the user you are logging in as has access to the object.
Connecting to Query Analyzer using the same login, and running the SQL
manually is the best test. If that works then it should work in your code.
If it does not work, then your SQL Connection, object name, or permissions
are wrong. Basically, get it working in the database to eliminate any
database issues, then put it into your app and is issues arrive you will
know they are the app and not the database.
"Adi" <adico@.clalit.org.il> wrote in message
news:1147338575.972058.140510@.g10g2000cwb.googlegroups.com...
> Could be few things. Check if you are connected to the database that
> the objects exist in. Also check who owns the object. If the object
> is not owned by the dbo and the object's owner is not the user that you
> use in the connection string, then you need to specify the owner's name
> as part of the object's name.
> Adi
>sql

Monday, March 19, 2012

Invalid Directory error message

Hi,

I am a newbie to integrating of asp page to crystal report. Please assist me in what error I am making.

From asp page, I would like to click on "Request Reports" button and it goes to ViewReports.asp

Within ViewReports.asp, I have the following code.

<%@. LANGUAGE="VBSCRIPT" %>
<title>Crystal Reports ASP Example - Displaying a Simple Report</title>
<%
reportname = "wwwroot\aspect\CommissionStatement2006.rpt"
%>

<!-- #include file="AlwaysRequiredSteps.asp" -->
<!-- #include file="MoreRequiredSteps.asp" -->
<!-- #include file="SmartVieweractivex.asp" -->

<%
strPeriod = Request.form("Period")
strReport = Request.Form("crystalradio")

Response.Write strPeriod
Response.Write "<br>"
Response.Write strReport

%>

<HTML>
<HEAD></HEAD>
<TITLE>View Reports</TITLE>

<BODY>
</BODY>
</HTML>

-----

Error I get is:

Error Type:
Crystal Reports ActiveX Designer (0x80043AC4)
Invalid directory.
/scripts/padmaja/AlwaysRequiredSteps.asp, line 56

Now the path of my report is

wwwroot\aspect\wwwroot\aspect\CommissionStatement2006.rpt

Line 56 of AlwaysRequiredSteps.asp is

Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)

Any ideas.

Thanks.I get this error because my reports are in another directory while my asp pages are in one directory. If I move the CR reports to the same directory as my ASP pages, then it works fine.

But any ideas as to how I can configure my path of the report in ASP pages?

'path of the report is wwwroot\merge\
strReport = Request.Form("crystalradio")
'reportname = "\merge\" & strReport
'Response.write reportname

reportname = "CommissionStatement2006.rpt"

Friday, March 9, 2012

Invalid buffer received from client.

I'm having seriouos trouble after installing SP4. I have an application writ
ten in ASP.NET 1.1 which worked fine with SQL 2000 SP3, but after upgrading
to SP4, the application totally crashed while trying to access the database.
It gives an error saying a
severe error has occued on the server. The
event log on the server has the following logged:
Error: 17805, Severity: 20, State: 3
Invalid buffer received from client.
For more information, see Help and Support Center at http://go.microsoft.com/fwlin
k/events.asp.
I'm sure it's SP4 because after I reinstalled SQL Server with SP3, everythin
g worked fine again. The server is running Windows 2003 SP1.
Anyone else having this problem or have a solution?Sp4 reduces the network packet size to 32767. Consider adjusting your app to
avoid the error.
<quote>
In SP4, the maximum value for the network packet size option (set using
sp_configure) is 32767. This is slightly less than half the previous maximum
of 65536. During upgrade, existing values larger than 32767 will
automatically be adjusted to 32767. If a script attempts to use sp_configure
to set a value larger than 32767 but less than or equal to 65536, the value
will also be set to 32767. Setting the network packet size to a value larger
than 65536 results in an error.
</quote>
There's used to be a bug even when the network packet size was set to
65535...
http://support.microsoft.com/kb/875411
-oj
"Watery" <waterydan@.hotmail.com> wrote in message
news:42813312@.duster.adelaide.on.net...
> I'm having seriouos trouble after installing SP4. I have an application
> written in ASP.NET 1.1 which worked fine with SQL 2000 SP3, but after
> upgrading to SP4, the application totally crashed while trying to access
> the database. It gives an error saying a severe error has occued on the
> server. The event log on the server has the following logged:
> Error: 17805, Severity: 20, State: 3
> Invalid buffer received from client.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> I'm sure it's SP4 because after I reinstalled SQL Server with SP3,
> everything worked fine again. The server is running Windows 2003 SP1.
> Anyone else having this problem or have a solution?|||Thanks oj...
Do you have an example of how to change the packet size to 32767 - is it thr
ough the connection string? At the moment, it has packet size set to 4096.
oj wrote:
> Sp4 reduces the network packet size to 32767. Consider adjusting your app
to
> avoid the error.
> <quote>
> In SP4, the maximum value for the network packet size option (set using
> sp_configure) is 32767. This is slightly less than half the previous maxim
um
> of 65536. During upgrade, existing values larger than 32767 will
> automatically be adjusted to 32767. If a script attempts to use sp_configu
re
> to set a value larger than 32767 but less than or equal to 65536, the valu
e
> will also be set to 32767. Setting the network packet size to a value larg
er
> than 65536 results in an error.
> </quote>
> There's used to be a bug even when the network packet size was set to
> 65535...
> http://support.microsoft.com/kb/875411
>|||Yes. You want to specify the "Packet Size=xxx" in your connectionstring.
According to the article, you might want to limit each of your insert batch
to 32767 rows.
-oj
"Watery" <waterydan@.hotmail.com> wrote in message
news:42817d1b$1@.duster.adelaide.on.net...
> Thanks oj...
> Do you have an example of how to change the packet size to 32767 - is it
> through the connection string? At the moment, it has packet size set to
> 4096.
> oj wrote:|||I tried what you suggested but with no vail.
Here's my connection string:
UID=user;PWD=password;Initial Catalog=DatabaseName;Data Source=ServerName;Pa
cket Size=4096;
I tried the packet size 2048, 1024, 768 but they all return the same error.
Any help is greatly appreciated!
oj wrote:
> Yes. You want to specify the "Packet Size=xxx" in your connectionstring.
> According to the article, you might want to limit each of your insert batc
h
> to 32767 rows.
>|||Perhaps, you want to explicitly define the sqldbtype for the sqlparameter
and be sure the length is not exceeding the allowable for the specified
type.
If you post your code (.Net call + sql), someone will take a closer look.
-oj
"Watery" <waterydan@.hotmail.com> wrote in message
news:428293aa$1@.duster.adelaide.on.net...
>I tried what you suggested but with no vail.
> Here's my connection string:
> UID=user;PWD=password;Initial Catalog=DatabaseName;Data
> Source=ServerName;Packet Size=4096;
> I tried the packet size 2048, 1024, 768 but they all return the same
> error.
> Any help is greatly appreciated!
> oj wrote:|||Thanks oj... I changed my code as you suggested and it is now working! :)
But now it runs extremely slow and frequently timeout. Any solution to this
problem as well?
oj wrote:
> Perhaps, you want to explicitly define the sqldbtype for the sqlparameter
> and be sure the length is not exceeding the allowable for the specified
> type.
> If you post your code (.Net call + sql), someone will take a closer look.
>|||Double check your sql to make sure proper indexes installed. Check out these
to see if they help:
http://support.microsoft.com/?id=308049
http://support.microsoft.com/kb/224587/
-oj
"Watery" <waterydan@.hotmail.com> wrote in message
news:4282bc9e@.duster.adelaide.on.net...
> Thanks oj... I changed my code as you suggested and it is now working! :)
> But now it runs extremely slow and frequently timeout. Any solution to
> this problem as well?
>
> oj wrote:|||Thanks oj... It's working fine now...
The problem was caused by creating an SQL parameter using DbType instead of
SqlDbType. I was trying to create a generic data provider that connects to b
oth Oracle and SQL Server. Now I think I have to map the individual DbType t
o SqlDbType.
Anyway, thanks for your help!! Much appreciated!
oj wrote:
> Double check your sql to make sure proper indexes installed. Check out the
se
> to see if they help:
> http://support.microsoft.com/?id=308049
> http://support.microsoft.com/kb/224587/
>|||You're very welcome.
-oj
"Watery" <waterydan@.hotmail.com> wrote in message
news:4282ce51@.duster.adelaide.on.net...
> Thanks oj... It's working fine now...
> The problem was caused by creating an SQL parameter using DbType instead
> of SqlDbType. I was trying to create a generic data provider that connects
> to both Oracle and SQL Server. Now I think I have to map the individual
> DbType to SqlDbType.
> Anyway, thanks for your help!! Much appreciated!
> oj wrote:

Friday, February 24, 2012

Intranet Set up with SQL server and ASP

Dear all,

I am trying to make a Intranet connection with SQL 2000 and ASP,
but a serious problem in connection string. Please can you help me in this issue

I am using following connection string.

(windows authontication)

Set conn=Server.CreateObject("ADODB.Connection")

conn.Mode=adModeReadWrite
conn.Open="PROVIDER=SQLOLEDB;Integrated Security=SSPI;Initial cataloge =nrth;DataSource=server"

System dsn =nrth
server name =server

This string makes following error

Microsoft OLE DB Provider for SQL Server error '80040e4d'

Invalid connection string attribute

//global.asa, line 17

Microsoft OLE DB Provider for SQL Server error '80040e4d'

Invalid connection string attribute

/test2.asp, line

can you correct this or suggest a valid connection string

Thank youThe DSN probably only exists on the one server. Try replacing it with
Server=servername.|||Originally posted by Satya
The DSN probably only exists on the one server. Try replacing it with
Server=servername.

still having error,

I am checking it in server itself

Sunday, February 19, 2012

Internet integration

Is there a way to embed reports in an INTERNET app (ASP.NET) using the following requirements:

- Get reports from Report Server (with toolbar and parameters)
- Security authentication/authorisation comes from ASP.NET web app (single sign-on, not Windows authentication, but custom)

In brief, I just want to host reports in an ASP.NET app, as they appear in the html viewer, but embedded in the app, on the Internet. URL access is perfect, but we require a single sign on with CUSTOM security.

Problem : how to integrate the security context of the web app and the rs, rendering reports WITHIN the web app.
Problems I am experiencing:

- Using an IFRAME to render the reports requires that the browser has direct access to the report server. We don't want this unless we can authenticate/authorise the user once only, through our custom security interface.
- Using the asp.net web app to call the API Render method will not render binary content such as images, unless we use the mhtml rendering format. How do we get the asp.net app to call the api and return an html page with all the correct links to images stored on the server?
Ideas:
Should we develop a custom Security extension?
Any help would be greatly appreciated.


Have you looked at the report execution web service? It seems to fit all of your requirements:

http://msdn2.microsoft.com/en-us/library/ms155071.aspx

|||

Our client has identical requirements - in short, is it possible to fulfill these requirements with RS2000? RS2005 is not an option.

The only compromise appears to be using web-services rendering, but this loses all interactivity functionality such as paging, drill through, document map and collapsible regions - you would also lose the ActiveX control unless you added script code. To me, this represented the best compromise.

Is there a way to fulfill the original requirements? The toolbar is mandatory.

|||

HI,

Thanks for your response. Can I render html (not mhtml) from the web service? How does it deal with binary content such as images, which would be in a separate file in html? I presume you can render only a stream of info, not two streams?

Actually, I admit to overlooking the functionality provided by report viewer. I discovered yesterday that it operates in two "modes" : Remote or local. Remote uses reports straight off the server (.rdl) and shows them beautifully, just as they are rendered in html by report manager (including toolbar and params). Local, however, uses a differnent mode of operation - the reports are rendered from rdlc files within your application without the parameters. You can pass parameters programmatically to local reports, but that's a lot of programming (duplication of effort - hence, my problem).

Incidentally, we solved the security problem by using remote mode with report viewer. The web.config has <identity impersonate="true">. We also set the username and password attributes of the identity tag, and set up a user account on the box, corresponding to the user identified in <identity>. The user account was configured to be allowed to access the report on the report server (report manager security setup) So the ASP.NET web app impersonates for our web clients and retrieves the relevant report, based upon our web app's security system. Our web app could use the SOAP API to iterate all reports from ReportServer and manage the reports through it's custom security interface.
In sum : USE THE REPORT VIEWER IN REMOTE MODE !

I hope this helps other confused souls out there.