Adding Dll Or Executable

Apr 13, 2007

Is there an ability to add dll or executable to ssis?????

View 4 Replies


ADVERTISEMENT

SSIS Programming Model - Adding Custom Dll As An Executable To Package

Aug 8, 2007



I am trying to add a custom dll(IncrementTask avalilable in SQL Server DTS Samples)
as an executable(Task) to an SSIS package.


The following console application consumes the Custom dll:



using System;

using Microsoft.SqlServer.Dts.Runtime;

using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;

using Microsoft.SqlServer.Dts.Samples;

using Microsoft.Samples.SqlServer.Dts;





namespace Microsoft.SqlServer.Dts.Samples



{

class Program

{

static void Main(string[] args)

{

Package p = new Package();

// Add a File System task to the package.

//This Line of code works fine.

//TaskHost execPkghost = (TaskHost)p.Executables.Add("STOCKQLTask");




//This line throws the following error: Object reference not set to an instance of an object.

TaskHost execPkghost = (TaskHost)p.Executables.Add("Microsoft.Samples.SqlServer.Dts.IncrementTaskUI,IncrementTaskCS,
Version=1.0.0.0,Culture=Neutral,PublicKeyToken=b23be0feabed1355");



TaskHost thFileSystemTask = execPkghost as TaskHost;



// Iterate through the package Executables collection.

Executables pExecs = p.Executables;

foreach (Executable pExec in pExecs)

{

TaskHost taskHost = (TaskHost)pExec;

Console.WriteLine("Type {0}", taskHost.InnerObject.ToString());

}

Console.Read();

}

}

}


I am getting a runtime error that "object reference has not been set to an instance of the object".
Any help on this is higly appreciated.

View 3 Replies View Related

Problem Running SSIS From C# Executable When Kicked Off By Another Executable.

Sep 26, 2007



If I kick off my C# executable from the server everything works fine but if I have another C# executable kick off the C# executable that runs the SSIS I get an error message saying it cannot run SSIS package. I am thinking it sounds like a permissions problem but not sure. Any suggestions/guidance would be greatly appreciated.

Errors I am getting.

2007-09-26 15:02:30,187 [1] ERROR reporting.Processor [(null)] - Problem with Direct Script





2007-09-26 15:02:30,843 [1] ERROR reporting.Processor [(null)] - {Microsoft.SqlServer.Dts.Runtime.DtsError, Microsoft.SqlServer.Dts.Runtime.DtsError, Microsoft.SqlServer.Dts.Runtime.DtsError, Microsoft.SqlServer.Dts.Runtime.DtsError, Microsoft.SqlServer.Dts.Runtime.DtsError}
Thanks in advance.

View 3 Replies View Related

CMD Executable From A Job Step

Feb 28, 2002

I'm trying to initiate an executable from a job step. This executable functions normally from a command prompt on the server and will initiate properly from a DTS package that is executed locally by a logged in user. It won't run from Query Analyzer, an Operating System Command jobstep, or a scheduled DTS package. The executable creates a report that gets written to disk and a window shows briefly during execution.

MS SQL 2000 on Win2K.

Any clues as to how to run this executable from a scheduled jobstep?

Thanks if you can help,
Mack

View 5 Replies View Related

Running An Executable As A Job

May 24, 2002

We have a job set up that runs a Visual Basic executable file. It was running fine. We just upgraded to SQL2000. The job still seems to run ok, but we are getting a message that the job failed. "The step did not generate any output. Process Exit Code -1073741819. The step failed." Yet, when we check the output tables, it seems as though the job ran ok. The programmer is not passing any exit codes. Any ideas?

View 1 Replies View Related

Run An Executable File In SQL

Feb 20, 2008

Hi, I'm new to SQL and I just got a new job with very little hands on training. I have executed a CreateTables.sql and now my boss wants me to run a Conversion.exe file. I am not sure how to do that, any help would be most appreciated. Thanks,
Laura

View 3 Replies View Related

Xp_cmdshell And An Executable File

May 14, 2001

View 1 Replies View Related

Running Job With Vb Executable On Windows NT

Feb 15, 2001

Hi,
I have a small Vb project( it is triggers Crystal report to run) which should be scheduled with SQL 7.0.

Project itself runs without any problem.

When I schedule a job to run that Myproject.exe with WIN95 Or create a DTS package and execute it on WINNT it also works fine.

But when I am trying to schedule that package OR create a separate job on WINNT to run Myproject.exe- nothing happen(it run 47 hours since yeasterday-nothing happen) Also under Job/Edit/Step1/Command I am using the following command

either: Myproject.exe OR cmd /c "D:VB98f100estvbCrystalMyproject.exe"

Any ideas,

Andy

View 1 Replies View Related

How To Execute An Executable Using A Sqlserver Job

Jun 14, 1999

I am trying to run an executable via a scheduled sqlserver job. I have set the jobstep type to CMDEXEC; and the commands for the jobstep that I have tried are:

start c:estinsertindb.exe
c:estinsertindb.exe
c:estinsert.bat
insert.bat above contains c:estinsertdb.exe or
start c:estinsertdb.exe
Is there an exception that will not allow a job to run an exe file?

I am running into a similar problem using the NT scheduler via the "at" command.
With NT, I run a bat file with the following command to create a scheduled task or job (at 10:10 /every:M,W,F c:estinsertdb.exe).
At 10:10, when the job is scheduled to run, nothing happens; but if I edit the job and manually start the job, it runs.

View 1 Replies View Related

Kick Off A VB Executable File

Jul 22, 1999

Can I kick off a VB.exe in SQL Server 6.5?

TIA,

Stella

View 1 Replies View Related

How To Run A Executable From Triggers Or Stored Procedures

Nov 16, 2001

Hi folks,

Is there is any way to run a executable from triggers or stored procedures..

Please let me know, whether it is possible in SQl Server 7.0.

Let me know asap...

rgds,
VJ

View 1 Replies View Related

How Can I Know Which Tables Modified With An Executable File

Jan 23, 2007

Kazim writes "generally when we find the new software on our customer and when they want to change the software they said "we must see and use the old datas on the new program". but at here the problem is starting for us because of i want to know on any example on the old software which data is stored on which table on sql server or it is possible for this example we can say spy. do you know anything for about this type of the question and how can we check which tables and columnS are affected by the software?
thnx."

View 1 Replies View Related

SQL Express 2005 Executable File Name?

Feb 19, 2008

I am having a hard time finding the executable file to start sql express 2005 or SQL exress 2005 with advance services. I installed the SQL express and had the desktop icon....but I thought i would need to uninstall it before installing SQL 2005 with advance services. Now I can not find anything to start the program.


View 1 Replies View Related

Calling An Executable File From Stored Procedure

Jul 26, 2007

Hi people.

I have this issue

I'm on a application server and i need to run a executable file from a SP, my problem is if i use xp_cmdshell (from the SP) it will try to run it on the SQL Server not on a App server, this a third party executable so cannnot be run on the sql backend.

Do you know any workaround for this?

View 8 Replies View Related

Can You Embed DTSX Package In A C# Winform Executable?

Mar 22, 2008



Im trying to figure out if there is a way to embed an ssis package into a c# winform?

I know that I can pass variables to a package and write the entire package out programatically, but im curious if there is a way to add the dtsx as an assembly or something. OR is there any tool that would take the ssis package and spit out its equivalent in code?

thanks

View 6 Replies View Related

Recovery :: Unable To Locate The Cluster Service Executable

Jun 12, 2015

I am having Windows 2012R2 Std with SQL2012SP2.  Trying to add SQL cluster node2 but unable to locate the instance name when I click on drop down button.Understand that SQL Server Agent is required but it is not listed as cluster resource.  Therefore, I perform the followingFrom Windows Power Shell with Administrator rights

1. Import-Module FailoverClusters
2. Add-ClusterResourceType "SQL Server Agent" c:windowssystem32SQAGTRES.DLL

Error: Add-ClusterResourceType : Unable to locate the cluster service executable on node1.The network name cannot be found.No problem to ping all cluster related names as well as fail-over to and from next available node.

View 3 Replies View Related

Installing SQL 2005 Trial Software - Which Executable Should I Download

May 31, 2006

I am in the process of downloading the executable file, however which am I meant to pick

X86

x64

IA64

I will be installing on a labtop, 256 memory, Pentium 4 1.7 GHZ

I have gone for the x86. Is this right? Also I know recommended memory is 1 gig but will I still be able to install. I just want to have a look at the procduct.

Please help

View 1 Replies View Related

Execute Process Task How To Exit The Executable Program

Jan 21, 2008

Hello everybody,

Could anybody tell me how can I stop the executable program which I am using in Arguments field of Execute Process Task Editor window. My SSIS process based on three steps.

1. retrieve the file from FTP location
2. Process the file by using windows 32bit application
3. transfer the processed file back to FTP location

The problem occurs in step 2, it opens the win32 application for processing and it does process BUT after that it won't exit untill I close it manually, so it never reaches to step 3 if I don't close it.

Thanks in advance.
Zee.



View 2 Replies View Related

Installing SQL Server 2005 Trial Version: Use X86 , X64 Or IA64 Executable?

Jan 4, 2008

Hi,
I want to install SQL server 2005 trial version from Microsoft, How do I know which excecutable to tale from these below?
Self-extracting executables:

X86 Executable
X64 Executable
IA64 Executable
Thanks

View 6 Replies View Related

Examples Of Certificates Created With Private Key And FROM EXECUTABLE FILE Options

Apr 4, 2006

Hi

I am looking at documentation of CREATE CERTIFICATE statement. I am having hard time in understanding if I want to create CERTIFICATE with above mentioned options, how I am supposed to create either PRIVATE KEY file or EXECUTABLE file. any example would be really helpful for what I am doing here.

thanks

Satya

View 1 Replies View Related

Integration Services :: SSIS Execute Process Task Executable Not Found

Jul 10, 2015

I have an execute process task set up to run ftp.exe and a script argument.  The ftp.exe is referenced in the executable field without a qualified path.  The package just seems to know it's there relatively.  I need to change this to run a secured ftp executable that I recently installed on my pc.  I put the new executable in the WindowsSystem32 folder where the old ftp.exe is stored.  But when I put the new executable in the executable field, it says the 'File/Process "FTPS.exe" is not in path'.  I get the same error when I fully qualify the path.  Is there something I need to do with the new executable for SSIS to pick it up without having to fully qualify the path?

View 8 Replies View Related

Using A Variable In An Expression To Populate The Executable Property Of An Execute Process Task In SSIS

Jan 22, 2008

Hello,

I am having a hard time setting the executable path for an Execute Process Task in SSIS. I have a variable that is initialized at package statup which holds the path to an executable in Windows. When I set the property "Executable" Path in an expression, I get a warning that the path for the executable is not set. One workaround was to try and initialize the variable with a bogus path with the hopes that the "correct" value will be written on run-time. NO LUCK. I still get the error and I cannot run the package until I put a static path.

Does anyone have a clue as to what is going on??

Mike

View 1 Replies View Related

Installing Sql Server 2005 Trial Software From Microsoft Website - Self Extracting Executable

Nov 14, 2005

Hello,

View 1 Replies View Related

Reporting Services :: Adding All Columns To Table Without Adding One By One

Sep 3, 2015

Is there any way or option to get the all columns of dataset added to table when we add a table in data region. It will take lot of time to add one by one and also there are chances to add one column ore than once.

View 7 Replies View Related

Adding Column Where Adding Year To Date In Date Format

Aug 6, 2013

What is the syntax for adding a column where you are adding a year to a date in a date format? For example adding a column displaying a year after the participation date in date format?

View 1 Replies View Related

Adding Sql Db

Jan 2, 2007

hey i have a very simple form here: www.syscpupower.com
 I would like to have the information from the form saved to a sql db with a time stamp.
here is the code i have for the page below:"C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
"server">



"form1" runat="server">

 
"z-index: 108; left: 0px; position: absolute; top: 189px">
 
"z-index: 109; left: 204px; width: 411px; position: absolute; top: 18px;
height: 160px">
"3" rowspan="3" style="text-align: center"> Please accept to view your detailed trip information.
"Button1" runat="server" OnClick="Button1_Click" Style="z-index: 102;
left: 322px; position: absolute; top: 261px" Text="Accept" Width="60px">
"Button2" runat="server" OnClick="Button2_Click" Style="z-index: 103;
left: 392px; position: absolute; top: 261px" Text="Decline" Width="64px">
"Label1" runat="server" Style="z-index: 104; left: 254px; position: absolute;
top: 198px" Text="Please Enter Your First and Last Name!" Width="273px">
"TextBox1" runat="server" Style="z-index: 105; left: 278px; position: absolute;
top: 229px" Width="216px">
"RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
ErrorMessage="FirstName LastName" Font-Size="12px" Style="z-index: 106; left: 500px;
position: absolute; top: 229px">*
"ValidationSummary1" runat="server" Style="z-index: 110;
left: 263px; position: absolute; top: 300px" Width="284px">

View 5 Replies View Related

Adding A Value In One Row To A Value In The Next Row.

Nov 27, 2007

Hello








A
B
C
D

1
230
40
190
190

2
470
194
276
466

3
376
328
48
514

4
558
340
218
732

5
447
483
-36
696

6
218
357
-139
557

7
395
414
-19
538

8
264
375
-111
427

9
214
285
-71
356

10
218
251
-33
323

In the above table I am looking to replicate column D in sql, columns A,B and C are already generated by the sql.

D is currently done in Excel using =D1 + C2 which is in spot D2.

Can this be done in sql? Does anyone have an example. I am looking to do it in a select query if possible.

Thanks

View 3 Replies View Related

Adding Sql Parameter In VB

Oct 16, 2006

I have a details view with several parameters set up in my asp.net 2.0 code, I want to add a parameter before the sql parameter is executed. I need to use the find control of the details view because I am using items/edit item templates in my details view control. I tried this(see below) as well as the detailsview item command event args to no avail. It doesn't see the other parameters that have already been declared in my asp.net code. I don't want to have to declare all my varibles that are already in my asp.net code. I just want to add another parameter.  Sub InsertNew(ByVal sender As Object, ByVal e As DetailsViewInsertEventArgs) _    Handles dvEvents.ItemInserting        Dim dvr As DetailsViewRow        For Each dvr In dvEvents.Rows  Dim CatIDup As Integer = CType(dvr.FindControl("ddlCat"), DropDownList).SelectedValue            sdsevents.InsertParameters.Add("evCatID", CatIDup)sdsevents.Insert()

View 4 Replies View Related

Adding An Image To SQL

Dec 4, 2006

Looking for any help someone can offer on adding an image to SQL.Working on what will hopefully be quite a big site and the user will be asked for some details, one of which will be an image (jpg, gif or bmp).Rather than add the image to a folder on the server, a folder which could end up being quite large, I was hoping someone could give me some help, suggestions or even point me towards a tutorial on how to store the image in an SQL database.Any helps appreciated, thanks :)

View 2 Replies View Related

Adding To 2 Different Tables

Apr 19, 2007

Hi Everyone,
I have a page with a textbox and a dropdown list. The user will enter a company name in the text box and select a number from 1 - 20 (number of delegates for that company) in the dropdown list.
I've got the text box and dropdown writing to tblCompany but I would also like it to write to tblUsers at the same time. The reason for this is that i need it to set up the number of users that have been selected in the dropdown list.
Here is the codebehind file:Imports System.Data.SqlClient
Imports System.Web.Configuration

Partial Class cms_Management_Company_NewCompany
Inherits System.Web.UI.Page

Dim companyName As String
Dim companyActive As Boolean
Dim companyArchived As Boolean
Dim companyDelegates As Integer

Dim userForeName As String
Dim userSurname As String
Dim userEmail As String
Dim userUsername As String
Dim userPassword As String
Dim userActive As Boolean
Dim userTypeID As Integer
Dim companyID As Integer

Dim i As Integer
Dim NoLoops As Integer

Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSave.Click
Dim conString As String = WebConfigurationManager.ConnectionStrings("General").ConnectionString

Dim con As New SqlConnection(conString)
Dim cmd As New SqlCommand("INSERT INTO tblCompany (CompanyName, CompanyActive, CompanyArchived, CompanyDelegates) VALUES (@CompanyName, @CompanyActive, @CompanyArchived, @CompanyDelegates)", con)

cmd.Parameters.AddWithValue("@CompanyName", companyName)
cmd.Parameters.Item("@CompanyName").Value = txtCompanyName.Text

cmd.Parameters.AddWithValue("@CompanyDelegates", companyDelegates)
cmd.Parameters.Item("@CompanyDelegates").Value = lstDel.SelectedValue

cmd.Parameters.AddWithValue("@CompanyActive", companyActive)
cmd.Parameters.Item("@CompanyActive").Value = True

cmd.Parameters.AddWithValue("@CompanyArchived", companyArchived)
cmd.Parameters.Item("@CompanyArchived").Value = False

Using con
con.Open()
cmd.ExecuteNonQuery()
con.Close()
End Using

Dim con2 As New SqlConnection(conString)
Dim cmd2 As New SqlCommand("INSERT INTO tblUsers (UserForeName, UserSurname, UserEmail, UserUsername, UserPassword, UserActive, UserTypeID, CompanyID) VALUES (@UserForeName, @UserSurname, @UserEmail, @UserUsername, @UserPassword, @UserActive, @UserTypeID, @CompanyID)", con2)

cmd2.Parameters.AddWithValue("@UserForeName", userForeName)
cmd2.Parameters.Item("@UserForeName").Value = "First Name - Delegate 1"

cmd2.Parameters.AddWithValue("@UserSurname", userSurname)
cmd2.Parameters.Item("@UserSurname").Value = "Surname - Delegate 1"

cmd2.Parameters.AddWithValue("@UserEmail", userEmail)
cmd2.Parameters.Item("@UserEmail").Value = "Email Address - Delegate 1"

cmd2.Parameters.AddWithValue("@UserUsername", userUsername)
cmd2.Parameters.Item("@UserUsername").Value = "Username - Delegate 1"

cmd2.Parameters.AddWithValue("@UserPassword", userPassword)
cmd2.Parameters.Item("@UserPassword").Value = "Password - Delegate 1"

cmd2.Parameters.AddWithValue("@UserActive", userActive)
cmd2.Parameters.Item("@UserActive").Value = True

cmd2.Parameters.AddWithValue("@UserTypeID", userTypeID)
cmd2.Parameters.Item("@UserTypeID").Value = 2

cmd2.Parameters.AddWithValue("@UserTypeID", userTypeID)
cmd2.Parameters.Item("@UserTypeID").Value = 1

Using con2
con2.Open()
For i = 1 To NoLoops
cmd2.ExecuteNonQuery()
Next i
con2.Close()
End Using

Response.Redirect("~/cms/Management/Company/Company.aspx")
End Sub

End ClassThe other thing I am not sure of is getting the ID of the new company and assiging it to the delegates in tblUsers (to associate them with the new company)I hope this makes sense.Thank you very much guys.Scott.

View 2 Replies View Related

Adding Value In A Query

Aug 25, 2007

I am trying to insert a value numeric + 1 in to db table but i get error when i do this
this is the code
Const SQL As String = "INSERT INTO [PageHits] ([DefaultPage]) VALUES (@defaultP)"Dim myCommand As New Data.SqlClient.SqlCommand(SQL, myConnection)myCommand.Parameters.AddWithValue("@DefaultP" + "1", DefaultP.Text.Trim())
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()
The Error:  
Must declare the variable '@defaultP'.
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: Must declare the variable '@defaultP'. 
 

View 1 Replies View Related

Adding In A Query

Sep 14, 2007

i want to add vales in a query
this is my scenario (how can i add the price column values and display as one record) ex. 222  17
table = table1
tep1  price (column)
222     5
222     2
222     10
 

View 2 Replies View Related

Adding A New Row To SQL Table

Oct 2, 2007

Hi all,
I have a database setup with a few rows and i would like to allow a user to create a new row of data. After some googling, I've deduced that I need to somehow use an onclick command to perform an insert command. here is my code as of right now:
 protected void ItemAdd_Click(object sender, EventArgs e)
{int newnum = 4;int POnum = newnum ++;
 
 string Item = textbox3.Text.ToString();
string Quantity = textbox4.ToString();string Part = textbox5.ToString();
string Description = textbox6.Text.ToString();string Price = textbox7.Text.ToString();string UOM = textbox8.Text.ToString();
SqlDataSource2.InsertParameters.Clear();
SqlDataSource2.InsertParameters.Add("@Item", Item);SqlDataSource2.InsertParameters.Add("@Quantity", Quantity);
SqlDataSource2.InsertParameters.Add("@Part", Part);SqlDataSource2.InsertParameters.Add("@Description", Description);
SqlDataSource2.InsertParameters.Add("@Price", Price);SqlDataSource2.InsertParameters.Add("@UOM", UOM);
SqlDataSource1.InsertCommand = "insert into ItemMaster "+"values (12, @Item, @Quantity, @Part, @Description, @Price, @UOM)";
SqlDataSource2.Insert();
 
 
}
 
here's the aspx:
 
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="createpo.aspx.cs" Inherits="Subpgs_Purchasing_createpo" Title="Create A PO" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 600px; position: relative; top: 30px; height: 253px" cellpadding="10px">
<tr>
<td style="width: 180px; text-align: left;" rowspan="2">
Select Vendor<br />- or -<br /><asp:LinkButton ID="Linkbutton1" runat="server" OnClick="Linkbutton1_Click">Create Vendor</asp:LinkButton></td>
<td style="width: 100px" rowspan="2">
<asp:ListBox ID="ListBox2" runat="server" DataSourceID="SqlDataSource1" DataTextField="Name"
DataValueField="ID" OnSelectedIndexChanged="ListBox2_SelectedIndexChanged"></asp:ListBox><asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [Vendor_info]"></asp:SqlDataSource>
</td>
<td style="width: 180px; text-align: left;">
Job/Req.S.O. No.</td>
<td style="width: 100px">
<asp:TextBox ID="Job" runat="server"></asp:TextBox></td>
</tr>
<tr>
 
<td style="width: 180px; text-align: left;">
Terms</td>
<td style="width: 100px">
<asp:TextBox ID="Terms" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 180px; text-align: left;">
F.O.B.</td>
<td style="width: 100px">
<asp:TextBox ID="FOB" runat="server"></asp:TextBox></td>
<td style="width: 180px; text-align: left;">
Ship To:<br />
Address:<br />
City / State / Zip:</td>
<td style="width: 100px">
<asp:TextBox ID="Ship1" runat="server"></asp:TextBox>
<asp:TextBox ID="Ship2" runat="server"></asp:TextBox>
<asp:TextBox ID="Ship3" runat="server"></asp:TextBox></td>
</tr>
</table>
 
<br />
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Purchase_Orders.mdf;Integrated Security=True;User Instance=True;Context Connection=False"
ProviderName="System.Data.SqlClient" SelectCommand="SELECT [Item], [Quantity], [Part], [Description], [Price], [UOM], [Ammount], [PONumber] FROM [ItemMaster]" DeleteCommand="DELETE FROM [ItemMaster] WHERE [PONumber] = @PONumber" InsertCommand="INSERT INTO [ItemMaster] ([Item], [Quantity], [Part], [Description], [Price], [UOM], [Ammount], [PONumber]) VALUES (@Item, @Quantity, @Part, @Description, @Price, @UOM, @Ammount, @PONumber)" UpdateCommand="UPDATE [ItemMaster] SET [Item] = @Item, [Quantity] = @Quantity, [Part] = @Part, [Description] = @Description, [Price] = @Price, [UOM] = @UOM, [Ammount] = @Ammount WHERE [PONumber] = @PONumber">
<DeleteParameters>
<asp:Parameter Name="PONumber" Type="Decimal" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Item" Type="String" />
<asp:Parameter Name="Quantity" Type="Decimal" />
<asp:Parameter Name="Part" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Price" Type="Decimal" />
<asp:Parameter Name="UOM" Type="String" />
<asp:Parameter Name="Ammount" Type="Decimal" />
<asp:Parameter Name="PONumber" Type="Decimal" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Item" Type="String" />
<asp:Parameter Name="Quantity" Type="Decimal" />
<asp:Parameter Name="Part" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Price" Type="Decimal" />
<asp:Parameter Name="UOM" Type="String" />
<asp:Parameter Name="Ammount" Type="Decimal" />
<asp:Parameter Name="PONumber" Type="Decimal" />
</InsertParameters>
</asp:SqlDataSource>
<br />
<table>
<tr>
<td>Item #</td>
<td><asp:TextBox ID="textbox3" runat=server></asp:TextBox></td>
<td>Quantity</td>
<td><asp:TextBox ID="textbox4" runat=server></asp:TextBox></td>
<td>Part Number</td><td><asp:TextBox ID="textbox5" runat=server></asp:TextBox></td>
</tr>
<tr>
<td>Description</td>
<td><asp:TextBox ID="textbox6" runat=server></asp:TextBox></td>
<td>Unit Price</td>
<td><asp:TextBox ID="textbox7" runat=server></asp:TextBox></td>
<td>Unit of Measure</td>
<td><asp:TextBox ID="textbox8" runat=server></asp:TextBox></td>
</tr>
<tr>
<td colspan="6" align="center"><asp:Button ID="ItemAdd" runat=server text="Add Item" OnClick="ItemAdd_Click" /></td>
</tr>
</table>
&nbsp;<br />
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="PONumber"
DataSourceID="SqlDataSource2">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="Item" HeaderText="Item" SortExpression="Item" />
<asp:BoundField DataField="Quantity" HeaderText="Quantity" SortExpression="Quantity" />
<asp:BoundField DataField="Part" HeaderText="Part" SortExpression="Part" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
<asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" />
<asp:BoundField DataField="UOM" HeaderText="UOM" SortExpression="UOM" />
<asp:BoundField DataField="Ammount" HeaderText="Ammount" SortExpression="Ammount" />
<asp:BoundField DataField="PONumber" HeaderText="PONumber" ReadOnly="True" SortExpression="PONumber"
Visible="False" />
</Columns>
</asp:GridView>
<br />
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Submit Data" OnClick="Button1_Click" />&nbsp;<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Please Verify Information below!" Visible="False"></asp:Label><br />
<br />
<table align="left">
<tr>
<td style="width: 200px; text-align: left;">
<asp:Label ID="Label4" runat="server" Text="Job/REQ.S.O. No." Visible="false"></asp:Label></td>
<td style="width: 200px; text-align: left;">
<asp:Label ID="Label5" runat="server"></asp:Label></td>
</tr>
<tr>
<td style="width: 200px; text-align: left;">
<asp:Label ID="Label7" runat="server" Text="Terms" Visible="false"></asp:Label></td>
<td style="width: 200px; text-align: left;">
<asp:Label ID="Label8" runat="server"></asp:Label></td>
</tr>
<tr>
<td style="width: 200px; text-align: left;">
<asp:Label ID="Label10" runat="server" Text="F.O.B." Visible="false"></asp:Label></td>
<td style="width: 200px; text-align: left;">
<asp:Label ID="Label11" runat="server"></asp:Label></td>
</tr>
</table>
 
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource1"
Height="50px" Visible="False" Width="260px" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" DataKeyNames="ID" ForeColor="Black">
<FooterStyle BackColor="#CCCCCC" />
<EditRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<Fields>
<asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Street" HeaderText="Street" SortExpression="Street" />
<asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
<asp:BoundField DataField="State" HeaderText="State" SortExpression="State" />
<asp:BoundField DataField="Zip" HeaderText="Zip" SortExpression="Zip" />
<asp:BoundField DataField="Telephone Number" HeaderText="Telephone Number" SortExpression="Telephone Number" />
<asp:BoundField DataField="Contact Information" HeaderText="Contact Information"
SortExpression="Contact Information" />
<asp:BoundField DataField="E-mail address" HeaderText="E-mail address" SortExpression="E-mail address" />
<asp:BoundField DataField="Fax Number" HeaderText="Fax Number" SortExpression="Fax Number" />
<asp:BoundField DataField="Comments" HeaderText="Comments" SortExpression="Comments" />
</Fields>
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
</asp:DetailsView>
<br />
<br />
<br />
<asp:Button ID="Button2" runat="server" Text="E-Mail PO" Visible="False" OnClick="Button2_Click" />
 
 
 
</asp:Content>
 
whenever I run this, I receive the following error and am not sure how to correct it:
 
System.Data.SqlClient.SqlException: Must declare the scalar variable "@Item".
 
If someone could please explain to me the process here of what is going ion it would be greatly appreciated.  My understanding is the @item is just a variable if you will so i'm not sure why its stating i need to declare it.
 
Thank you all!
 

View 4 Replies View Related







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