Examples For Using DirectRow Method?

Jul 6, 2006

Hi!

I was just wondering if there are any examples on how to work with the Script Editor, and more specifically how to use the DirectRow method? I've seen some examples that say that the editor automatically creates the methods DirectRowTo<output buffer>, but it doesn't say how that is done. If I just specify Row.DirectRow(output buffer #), it says that the method is protected.

Any help or just pointing me in the right direction would be greatly appreciated!

Thanks!

Jeff Tolman
E&M Electric
jeff.tolman@enm.com

View 4 Replies


ADVERTISEMENT

Error: Value Does Not Fall Within The Expected Range. Error In Buffer.DirectRow Method

Oct 10, 2006

Hi

I am trying to make a custom task. The custom task has one input, which i map to externalmetadata column in the task and one output.

When i run the task it fails with this error ( I am putting the whole SSIS message)

SSIS package "Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.
Information: 0x40043006 at Data Flow Task, DTS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, DTS.Pipeline: Pre-Execute phase is beginning.
Information: 0x402090DC at Data Flow Task, Flat File Destination [1855]: The processing of file "C:ole db eft data.txt" has started.
Information: 0x4004300C at Data Flow Task, DTS.Pipeline: Execute phase is beginning.
Error: 0xC0047062 at Data Flow Task, Lib [2387]: System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSBuffer90.DirectRow(Int32 hRow, Int32 lOutputID)
at Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer.DirectRow(Int32 outputID)
at Lib1.LibPM.ProcessInput(Int32 inputID, PipelineBuffer buffer)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper90 wrapper, Int32 inputID, IDTSBuffer90 pDTSBuffer, IntPtr bufferWirePacket)
Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: The ProcessInput method on component "Lib" (2387) failed with error code 0x80070057. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: Thread "WorkThread0" has exited with error code 0x80070057.
Error: 0xC0047039 at Data Flow Task, DTS.Pipeline: Thread "WorkThread1" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: Thread "WorkThread1" has exited with error code 0xC0047039.
Information: 0x40043008 at Data Flow Task, DTS.Pipeline: Post Execute phase is beginning.
Information: 0x402090DD at Data Flow Task, Flat File Destination [1855]: The processing of file "C:ole db eft data.txt" has ended.
Information: 0x40043009 at Data Flow Task, DTS.Pipeline: Cleanup phase is beginning.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "Flat File Destination" (1855)" wrote 0 rows.
Task failed: Data Flow Task
Warning: 0x80019002 at Package: The Execution method succeeded, but the number of errors raised (5) 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 "Package.dtsx" finished: Failure.
----------------------------



This is my piece of code which is trying to put the data in the output buffer (ProcessInput function).

int GoodOutputId = -1;

IDTSInput90 inp = ComponentMetaData.InputCollection.GetObjectByID(inputID);

//GetErrorOutputInfo(ref errorOutputID, ref errorOutputIndex);

GoodOutputId = ComponentMetaData.OutputCollection[0].ID;
System.Console.Write("Here i am");
System.Console.Write(GoodOutputId);
if (!buffer.EndOfRowset)
{
while (buffer.NextRow())
{
if (_inputColumnInfos.Length == 0)
{
buffer.DirectRow(GoodOutputId);
}
else
{
buffer.DirectRow(GoodOutputId);
}
}
}

I have put any code in the else part as i am just trying to run the task as of now and later put the functionality in it.

Please let me know if i have missed something. Thanks in advance.

Vipul

View 1 Replies View Related

Send Request To Stored Procedure From A Method And Receive The Resposne Back To The Method

May 10, 2007

Hi,I am trying to write a method which needs to call a stored procedure and then needs to get the response of the stored procedure back to the variable i declared in the method. private string GetFromCode(string strWebVersionFromCode, string strWebVersionString)    {      //call stored procedure  } strWebVersionFromCode = GetFromCode(strFromCode, "web_version"); // is the var which will store the response.how should I do this?Please assist.  

View 3 Replies View Related

Update Method Is Not Finding A Nongeneric Method!!! Please Help

Jan 29, 2008

Hi,
 I just have a Dataset with my tables and thats it
 I have a grid view with several datas on it
no problem to get the data or insert but as soon as I try to delete or update some records the local machine through the same error
Unable to find nongeneric method...
I've try to create an Update query into my table adapters but still not working with this one
Also, try to remove the original_{0} and got the same error...
 Please help if anyone has a solution
 
Thanks

View 7 Replies View Related

XML And DTS Examples

Feb 18, 2002

Are there any examples of using DTS and XML/XLS? specifically, importing data. I have searched through BOL and cant find any, nor is there any reference to XML in the book "Professional SQL 2000 DTS"

Many thanks

View 2 Replies View Related

Examples

Jul 20, 2005

I see a lot of example, but where do these example procedures go. Likedeclare (whatever)?below is an example i read. Where do you put this to make it execute, is itthe view screen or the stored procedure screen?I'm using MSDE now to learn, and I can't get nothing working except simpleselect query statements.In the northwind example (northwindcs), how would I do a parameter querylike this:Have a dialog box ask user to enter customerid to bring up. (in a query nownot a form)Also, how would you check if a certain customerid exist? Example, CHOPS isone customerid. If I wanted to use a query to check if it exist, and returnno records, but just do an action (like add a record) if it didn't exist,how?[color=blue]> CPU SQL> (ms)> -- Convert to varchar (implicitly) and compare right two digits> -- (original version -- no I didn't write it)> 4546 select sum(case right(srp,2)> when '99' then 1 when '49' then 1 else 0 end)> from sf>> -- Use LIKE for a single comparison instead of two, much faster> -- Note that the big speedup indicates that> -- CASE expr WHEN y then a WHEN z then b .> -- recalculates expr for each WHEN clause> 2023 select sum(case when srp like '%[49]9' then 1 else 0 end)> from sf[/color]I tried some variations of this, and indeed it seems that there is a costwhen the expression appears with several WITH clauses. I tried a variationof this, where I supplemented the test table with a char(2) column, so Icould factor out that the WITH clauses themselves were not the culprits.CREATE TABLE realthing (realta real NOT NULL,lasttwo char(2) NOT NULL)goINSERT realthing (realta, lasttwo)SELECT r, right(r, 2)FROM (SELECT r = convert(real, checksum(newid()))FROM Northwind..Orders aCROSS JOIN Northwind..Orders b) AS fgoDBCC DROPCLEANBUFFERSgoDECLARE @start datetimeSELECT @start = getdate()SELECT SUM(CASE right(realta, 2)WHEN '99' THEN 1WHEN '49' THEN 1WHEN '39' THEN 1ELSE 0 END)FROM realthingSELECT datediff(ms, @start, getdate()) -- 20766 ms.goDBCC DROPCLEANBUFFERSgoDECLARE @start datetimeSELECT @start = getdate()SELECT SUM(CASE WHEN right(realta, 2) LIKE '[349]9' THEN 1 ELSE 0 END)FROM realthingSELECT datediff(ms, @start, getdate()) -- 8406 ms.goDBCC DROPCLEANBUFFERSgoDECLARE @start datetimeSELECT @start = getdate()SELECT SUM(CASE lasttwoWHEN '99' THEN 1WHEN '49' THEN 1WHEN '39' THEN 1ELSE 0 END)FROM realthingSELECT datediff(ms, @start, getdate()) -- 920 ms.goDBCC DROPCLEANBUFFERSgoDECLARE @start datetimeSELECT @start = getdate()SELECT SUM(CASE WHEN lasttwo LIKE '[349]9' THEN 1 ELSE 0 END)FROM realthingSELECT datediff(ms, @start, getdate()) -- 1466 ms.Thus, when using the char(2) column LIKE is slower despite that thereis only one WHEN condition. So indeed it seems that right(realta, 2)is computed thrice in the first test.Another funny thing is the actual results from the queries - they aredifferent. When I ran:select count(*) from realthing where lasttwo <> right(realta, 2)The result was about half of the size of realthing! I can't see thatthis difference affects the results though.Now, your article had a lot more tests, but I have to confess thatyou lost me quite early, because you never discussed what is theactual problem. Since you are working with floating-poiont numbersthere is a great risk that different methods not only has differentexecution times, but also gives different results.--Erland Sommarskog, SQL Server MVP, Join Bytes!Books Online for SQL Server SP3 athttp://www.microsoft.com/sql/techin.../2000/books.asp

View 2 Replies View Related

MSDE Examples?

Apr 29, 2004

Does MSDE have the PUB database example in it? Just wondering before I download it.

View 2 Replies View Related

What Is Purpose Of N In SQL Examples?

Jul 23, 2005

What is the purpose of the "N" preceding the parameter values in theSQL examples?Here is an example copied from Books Online, SP_ATTACH_DB:EXEC sp_attach_db @dbname = N'pubs',@filename1 = N'c:Program FilesMicrosoft SQLServerMSSQLDatapubs.mdf',@filename2 = N'c:Program FilesMicrosoft SQLServerMSSQLDatapubs_log.ldf'I've found that my sp_attach_db routine works without the "N", but Ineed to know what it is that I don't know.Thank you everybody for all your help.

View 1 Replies View Related

SQLCE And WPF Examples?

Jan 3, 2007

Hello all,

I want to use SQLCE and WPF.

Can anyone direct me to some example code.

two way binding with a sqlceResultSet would be a great start.

(last inquiry was in Aug of 06)

Thanks

Mike (still trying to get the latest tech to work together) Greenway

View 6 Replies View Related

Where To Find Examples

Jun 30, 2006

Hi!

Where can i find examples of T-SQL executed by one instance of SQL Server 2000 to communicate to a 2005 SQL Broker instance (both located on the same server)?

thanks for your help!

View 2 Replies View Related

Chart Examples - Advanced

Mar 28, 2006

Hello, Can anyone direct me to some sample charts created with 2000 Reporting Services? Looking for the advanced capabilities and quality of the charts.

Thanks
SactoJoe

View 3 Replies View Related

Databanks As Test-examples

Nov 21, 2007

hican someone help me. i am looking for free databanks. i could use asexamples for testing the usage of them. just for a start getting intothis field.i appreciate your help. thx ann xx

View 1 Replies View Related

WriteBak Reaktime Examples

Jul 20, 2005

Hello there:I am trying to configure an excel worksheet as an Writebackapplication but I want to block some cells in the page and combiningcell protecion does nos alloudm to insert rew rowns

View 2 Replies View Related

Report Services Examples.. Please.. VS.NET

Jul 20, 2005

Hi..Im newbie on Report Services with VS.NET... I made a cube on olap.. andI try to lear some mdx for my reports..But, in the report designer... I need a lot of help..Please.. anybody.. can help me¨??Thanks a lot...!Karina Gamez*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 1 Replies View Related

SSIS Programming Examples

Mar 28, 2006

I have been creating SSIS packages programmatically and have run into somewhat of a dead end. I have found the examples provided with the SQL 2005 install very helpful, but they only cover setting up three tasks: Sort task, OleDB Source and a Flat File Destination.

Does anyone have any examples or knows of examples of using the Merge Join task and the Conditional Split task?

I'm doing it all programmatically and so far I'm having trouble finding much in the way of documentation or examples.

Any help would be great!

Thanks,

Mark

View 8 Replies View Related

ADS Wizard, Tutorials And Examples - Please Help.

Oct 26, 2006

Hi,

I'm new to SQL Server Technology and am trying to learn how to create a Mobile Device application and to sync it with a desktop application that uses Access. I have found a lot of information but some of it doesn't seem to make sense.

I found this blog: http://blogs.msdn.com/sqlservereverywhere/archive/2006/08/29/729730.aspx which is the announcement of Access Database Synchronizer (ADS) CTP. I downloaded it and installed it with all the prerequisites. This is the part i can't understand:

"The CTP setup installs the desktop component required for synchronizing Microsoft Access database with SQL Server Everywhere Edition database on the device."

I cannot seem to find the desktop component to try out! The Readme shows you how to pull and push data but i can't see where the desktop data sync wizard is located. Should there be something installed on my desktop that i can see?

Also, there doesn't seem to be much help or examples around on this component as yet. Can anyone point me in the right direction for examples, help, or tutorials on this.

This paragraph also confuses me:

"Note: As of today only SQL Server Mobile Edition is available for devices. SQL Server Everywhere Edition whould be available for devices at time of SQL Server Everywhere Edition RTW whihc is planned for November 2006".

Does this mean SQL Everywhere won't work on mobile devices until November?

Sorry for all the questions but i'm still trying to learn this stuff so i can write my application for Windows CE. Thanks in advance.

View 8 Replies View Related

Where Do I Find The Examples That Come With Sql Server

Apr 3, 2006

books online mentions examples stored on the pc when sql is installed, but the examples are not on my machine. i know they are on the disk somewhere, but i dont have the disk. i have tried going to add remove programs and adding extra sql components but i cant find the examples there either. can anyone tell me where to find them?

View 1 Replies View Related

How Do You Set Up And Use Endpoints? Examples Required

Jun 20, 2007

i have posted here a few times on my endpoint issues but i cant find a resolution so im approaching the issue from a different angle. can you guys tell me how you create and consume endpoints, preferably with the endpoint code, the url you use to see the wsdl, and any network/pc settings you may have altered to get endpoints to work. im looking for tips or steps that may not be included in basic endpoint tutorials. I really am stuck and have no idea what else to try. thanks all

View 3 Replies View Related

SQL Northwind End To End Database Solutions (examples)

Apr 30, 2004

Does anyone know where I can find a Northwind end to end database solutions (examples) written in ASP.NET (VB). I would like to reverse engineer this project to learn more about ASP.NET?

Thanks.

View 1 Replies View Related

New - Learning By Code Examples - Need Guidance

Feb 25, 2005

Hi

I'm learning by going through the tutorials and such and modifying the code to try and learn how to do more and different things.

I have a MSDE Database, and I'm building a query from the WebMatrix Code Builder.

I can get a Select and Where to work on a "Category" colum as String; to return from a text box control (where I enter the name) and on button click.

What I would like to learn how to do and am having trouble is do a select Where "Category" (string) and "Status"(Int) are the same.

I have two Seperate Textboxes after i make the Where / And Query, but I'm not sure i have the button click code right.

I have included the code below - Sorry if this is so basic ;-) - The Sub_Button1 Click is at the end.


Function ShowRecords(ByVal category As String, ByVal status As Integer) As System.Data.DataSet
Dim connectionString As String = "server='(local)'; trusted_connection=true; database='SalesContacts'"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)

Dim queryString As String = "SELECT [Contact].* FROM [Contact] WHERE (([Contact].[Category] = @Category) AND ("& _
"[Contact].[Status] = @Status))"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

Dim dbParam_category As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_category.ParameterName = "@Category"
dbParam_category.Value = category
dbParam_category.DbType = System.Data.DbType.String
dbCommand.Parameters.Add(dbParam_category)
Dim dbParam_status As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_status.ParameterName = "@Status"
dbParam_status.Value = status
dbParam_status.DbType = System.Data.DbType.Int32
dbCommand.Parameters.Add(dbParam_status)

Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)

Return dataSet
End Function

Sub Button1_Click(sender As Object, e As EventArgs)
DataGrid1.DataSource = ShowRecords(CStr(TextBox1.Text)&(CInt(TextBox2.Text)))
DataGrid1.DataBind()
End Sub

View 4 Replies View Related

Any Good Audit Trail Examples?

Jun 17, 2002

Hi Guys!

What's the best way to keep an audit trail of every insert, update, and delete of a certain table? Any example code out there? I'm thinking in terms of a trigger for each event, for instance, the update trigger would insert a new record into the audit table with a field for each column in the deleted table and a field for each column in the inserted table.

Thanx

Dave

View 3 Replies View Related

Any *simple* External Activation Examples Available?

Feb 13, 2007

BOL only seems to say that you can do it w/o really showing how, and the ExternalActivator sample at gotdotnet.com contains so much functionality I'm not sure what's required just for the external activation. Are there any docs or samples out there that focus on how to do it w/o obscuring the matter with a bunch of other functionality? (I prefer docs to project samples, b/c the samples tend to have hacks like hardcoded paths and connection strings so that they rarely work correctly right out of the box.)

TIA

View 1 Replies View Related

Need Some Examples And Small Projects On Ssis

Mar 30, 2008

Am new to SSIS, I saw only few examples from the textbook but i need to learn a lot from the ssis , so can any one suggest me where can i find good examples and small projects , so that i can get more practise on the ssis.


Thanks ,
Raj

View 3 Replies View Related

SQL Server Service Broker Examples

Jul 17, 2005

Recently there has been questions on some of the newsgroups about examples for SQL Server Service Broker. So, yesterday on a flight back to England I crofted up three different SQL Server projects as examples: LocalSampleRemoteSampleServer1RemoteSampleServer2
All three examples are jus your very basic €œHello World€? example, but they show: LocalSample €“ communication between two databases on the same SQL server instance. MasterKeys in a database and the database being TrustWorthyRemoteSampleServerX €“ These two samples are meant to run on two different machines/instances and in the samples you set up both transport security and dialog security by using Certificates.
Download the zip file from here [0], unzip and read the README.txt file, and €“ Have Fun!!
[0] : http://staff.develop.com/nielsb/code/servicebrokerexamples.zip
 

View 6 Replies View Related

Database Examples For SQL Server 2005

Nov 8, 2007

Hi,

I have installed SQLServer 2005 along with Visual Studio 2005 Professional. I am trying to study some database examples (CreateDB for example) but I always get the mesage that I need the Northwind database installed. I cannot find it anymore in the examples provided for SQL Server 2005. In the links provided after the error is displayed, I find that I should install SQL Server Express. I do not really want that because of some possible conflicts with the other 2005 version of SQL Server.

Is there a place I can download the Northwind database from? Will it work with SQL Server 2005?

Thank you.

View 3 Replies View Related

Strange Thing In All Examples At MSDN

Sep 18, 2007

Hi,
I have seen many examples at MSDN library related to SQL Querries in all queries one thing is same the way they use tables in there queries. BUT wht is this really i am not getting this, can anyone tell me.. the code and the problem is as follows:


Code Snippet
FROM Purchasing.ProductVendor JOIN Purchasing.Vendor
ON (ProductVendor.VendorID = Vendor.VendorID)In the above code u see "Purchasing.ProductVendor", I want to ask that wht is this
Purchasing Stands for, If we suppose that purxchasing is the database name then also
normally we use database name as Purchasing.dbo.ProductVendor BUT I am not getting that
what is this,
Please if someone knows then explain it to me,
Thanks.

View 2 Replies View Related

Stored Procedure Tutorial/Examples For SQL Express With ASP.Net 2.0

May 24, 2006

Hi, is there any tutorials out there that teaches newbies how to use Stored Procedures? I am using SQL Express with ASP.Net 2.0. Please help and thanks in advance.

View 1 Replies View Related

Any Free Examples That Can Download And View The Database?

Sep 18, 2006

The free one that i have downloaded doesn't seem to be able to view the database. Is there any free database which i can download? Please advise. Thanks.

View 1 Replies View Related

SSIS Custom Component/task Examples

Feb 8, 2006

Hi,

Near the end of 2005 Microsoft made available some sample C# apps that implemented custom SSIS tasks and components. I think Doug Ladenshlager may have had a heavy hand in building them.

Does anyone know where they are? I can't darned well find them!

-Jamie

View 1 Replies View Related

Examples Of OleDb With SQL Server Compact Edition

Jul 31, 2007

Hello,

My C# .NET application is currently using the System.Data.OleDb namespace to access SQL Server 2000 and SQL Server Express databases. I would like to begin using SQL Server Compact Edition to access a local database that has the same structure as the others. I'd like to use the same code regardless of the data source, so I would prefer to use System.Data.OleDb instead System.Data.SqlServerCe.

Where can I find examples of the use of System.Data.OleDb with SQL Server Compact Edition? Some of the specific questions I have are:

1.) How do I build the connection string for the OleDbConnection object?
2.) What are the limitations, if any, of using OleDb instead of SqlServerCe?

I will appreciate any help you can provide.

Thank you,

WTW

View 1 Replies View Related

Generating An Unique Number Within SSIS - Looking For Good Examples

Aug 17, 2007

Does anybody know how to generate a new identity value from within SSIS. Can anybody point me to a good example using a script component?

Thanks you very much!!!!
Sergio

View 2 Replies View Related

Could Somone Clarify SQL Division And Explain The Examples, Thanks In Advance!

Sep 17, 2007

Code Snippet
SELECT 3308 / 15104





The above division will result with: 0





Code Snippet
SELECT 3308 / (15104 * 1)





The above division will result with: 0




Code Snippet
SELECT 3308 / (15104 * 1.0)





The above division will result with: 0.219014830


MY MAIN GOAL is to produce a result of: 0.2

I was thinking of using ROUND, then with some combination of RIGHT. Your explanation and advice is greatly appreciated! Thanks again!

View 3 Replies View Related

Merge Replication - Examples For Custom Conflict Resolvers?

Oct 30, 2006

I have gone through BOL and various online resources including this one and I can't find any examples on how to use custom conflict resolvers to generate a result row which is a combination of the rows to be merged.

BOL says it can be done, but suitable examples are missing. I have found various posts requesting examples from up to a year ago, but can see no replies with relevant information

In particular I would like to see examples of

1) A stored procedure based custom conflict resolver

2) A business logic handler written in VB .Net

Here's hoping

aero1

View 16 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved