Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Tuesday, March 27, 2012

Executing Northwind Script to Create the Database on SLQEXPRESS Edition

I have Visual Studio 2005 Beta 2.00 install which have installed the SQLEXPRESS server.

I have the Script for the Northwind database which I need to run some demos but I can figure out how to execute this script.

Can someone tell me what todo or how to attatched the database to this server. I also have a copy of the database already created. But When I tried login in into the database I get an error login fail.

Which is the default user amd password for the northwind database?

Tia

Charles

I found a way to do it. I installed SQL manager and the tool has a option to attatch a database.

Thanks

Charles

Wednesday, March 21, 2012

ExecuteRow - Missing Definition

Hello,

I'm using Visual Studio 2005 with ADO.Net 2.0 but I am missing a definition for the sqlcommands' object "ExecuteRow"

oCommand =new System.Data.SqlClient.SqlCommand();

oCommand.ExecuteRow() ---------> this is the missing definition

Any ideas anyone ?

The SqlCommand class has no ExecuteRow method. Seethis thread.

What are you trying to do?

Don

|||

well I'm actually just running some tests (I'm currently migrating from 1.1 to 2.0)

I have a book by WROX which specifies the definitions for the command object (See attached image), it contains

a definition for ExecuteRow

|||

ItayZ:

I have a book by WROX which specifies the definitions for the command object (See attached image), it contains

a definition for ExecuteRow

Looks like you need a better book. ExecuteRow was dropped between Beta 1 and Beta 2.

|||

Geez, I hate day and date books. They inevitably have stuff wrong, since they have to go to press months before the final release. And I'm afraid that I've written a few. But Never Again.

A better book is indeed in order, but in the meantime you might check the Wrox Web site for an errata sheet.

Don

Sunday, February 26, 2012

Execute Permission denied when running from IIS

My development environment is IIS 5.1, asp.net 2.0, Visual Web Developer 05 Express, MS Sql 2005 Express with XP Pro. I used a "stored procedure" in a webpage Formview to insert a record in a child table after inserting a record in the parent table. All went well when testing in VWD.

After deploying to remote site on same machine, I get an error

"EXECUTE permission denied on object 'usp_Insertdataset', database 'Job_Tracker_SQL', schema 'dbo'"

when trying to insert. I know that SQL Express is not suppose to support stored procedures. Is there a work around? I need to host this site on this machine for the immediate future.

Thanks

cbrcdr

I think that you are incorrect in stating that SQL Server Express does not support stored procedures. I'd be curious to see where that is documented (but, I have been proven wrong in the past!).

But, in any case, I would bet that in your development environment, you were connecting to the database as a DBO (database owner), and the same was not true for the remote site. By default, no one but a DBO is granted any permissions on database objects.

You should be able to grant execute permissions to the "Public" role, which should take care of allowing anyone who is permitted to connect to the database to execute your stored procedure. As an alternative, you can grant execute permission to invididual users too.

Execute the following SQL while connected to your database as the DBO user (i.e., from a query window or whatever mechanism you have available):

GRANT EXECUTE ON usp_InsertdatasetTO Public

|||

Jason

I saw a Feature Matrix on a Mircosoft Webpage that compared all the SQL products and it indicted that SQL Express did not support Stored Procedures. Maybe it was not up to date. I assumed it was right but you are. I used SSMSE and set the permissions on the Stored Procedure to execute for the login and it works.

Thanks, that was my last big hurdle for this phase of my application.

George

Sunday, February 19, 2012

Execute Mutiple Tasks In Debug Mode

Maybe I'm missing something, but I can't find how to run multiple tasks in sequence while in Visual Studio debug mode. In DTS design mode I grew accustomed to right-clicking tasks one-at-a time, but in SSIS I find the additional step of having to exit Debugging mode after every task gets old after a while.

There must be a way to start execution at a certain task and have the package continue all the way to some other specified task. It would also be nice to have every task in a Group execute in sequence and stop (even if connections continue beyond the group). I could even settle for repeatedly clicking the Continue button in Debug mode, but it's always grayed out when the current task is finished!

Can this be achieved by setting breakpoints?

I have previously requested "Execute from here" functionality in the control flow. You can vote for this request here: http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=a2548612-b602-42ab-9ff9-563d927674f8

Adding a comment would help as well.

In the meantime, you can place all required tasks into a sequence container, right click on the sequence container and select "Execute task". All tasks in the container will be executed.

-Jamie

|||

Sequence container appears to be what I was looking for. Thanks. It seems obvious now that you've pointed it out, but features are easy to miss with so much new functionality.

I added some comments on your request.

Wednesday, February 15, 2012

execute dts 2000 failure

I have used to the execute dts 2000 task in Visual Studio to successfully execute a structured storage file for a simple DTS package.

I am trying to use the same method for another DTS package, which executes five other packages. I've tried both the 'structured storage' and 'embedded in task' methods pointing to the parent package but in debugging mode the execution immedately fails. When I execute the parent package in Management Studio, it successfully executes the five child packages. I am including the debugging message below, thogh it doesn't help me any. Does anyone know what the problem is?

SSIS package "BPSA_LOAD_ACCT_SUMMARY_NEW.dtSX" starting.
Error: 0x0 at Execute DTS 2000 Package Task: System.Runtime.InteropServices.COMException (0x80040427): Execution was canceled by user.
at DTS.PackageClass.Execute()
at Microsoft.SqlServer.Dts.Tasks.Exec80PackageTask.Exec80PackageTask.ExecuteThread()
Task failed: Execute DTS 2000 Package Task
Warning: 0x80019002 at BPSA_LOAD_ACCT_SUMMARY_NEW: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "BPSA_LOAD_ACCT_SUMMARY_NEW.dtSX" finished: Failure.

My misunderstanding.

I realize now that I have to execute the 5 DTS 2000 package tasks in the one 2005 project.

execute dts 2000 failuer

I have used to the execute dts 2000 task in Visual Studio to successfully execute a structured storage file for a simple DTS package.

I am trying to use the same method for another DTS package, which executes five other packages. I've tried both the 'structured storage' and 'embedded in task' methods pointing to the parent package but in debugging mode the execution immedately fails. When I execute the parent package in Management Studio, it successfully executes the five child packages. I am including the debugging message below, thogh it doesn't help me any. Does anyone know what the problem is?

SSIS package "BPSA_LOAD_ACCT_SUMMARY_NEW.dtSX" starting.
Error: 0x0 at Execute DTS 2000 Package Task: System.Runtime.InteropServices.COMException (0x80040427): Execution was canceled by user.
at DTS.PackageClass.Execute()
at Microsoft.SqlServer.Dts.Tasks.Exec80PackageTask.Exec80PackageTask.ExecuteThread()
Task failed: Execute DTS 2000 Package Task
Warning: 0x80019002 at BPSA_LOAD_ACCT_SUMMARY_NEW: The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "BPSA_LOAD_ACCT_SUMMARY_NEW.dtSX" finished: Failure.

My misunderstanding.

I realize now that I have to execute the 5 DTS 2000 package tasks in the one 2005 project.

|||I have small info about this problem. The real message in the DTS(2000) package log (but no in SSIS "Execute DTS 2000 Package Task" on SQL 2005 Server!) is:
"Step Error Source:
Step Error Description:(1:"My DTS 2000 Task Name") SubStep 'DTSStep_DTSExecutePackageTask_1' failed with the following error:
Exception of type 'System.OutOfMemoryException' was thrown.
Execution was canceled by user.Exception of type 'System.OutOfMemoryException' was thrown.
Step Error code: 80040427
Step Error Help File:
Step Error Help Context ID:0"
And this problem interrelated, as i any more know, with parallel execution of nested packages on DTS ("Execute on main package tread" option).
If you are yet interesting this problem - answer me there or email on sas72@.rambler.ru