Execute Macro Code In ActiveX
Apr 17, 2008
Hi All
I just have a excel macro code, It is working in excel itself.
But I want to execute within SSIL package.
When I am trying through Active X, It is returning error.
Can any one help me please....
MichaelRaj Arokiyasamy
View 3 Replies
ADVERTISEMENT
Apr 18, 2008
Hi all
I am running a excel macro from SSIS package, after executing macro I just want to remove the module(Macro code) from Excel file.
can you please tell me how it?
MichaelRaj Arokiyasamy
View 1 Replies
View Related
Mar 19, 2008
To overcome the inability to manage the sheet tab names when exporting from Reporting Services to Excel, is there anyway to include a short macro with the exported Excel workbook to Auto_Run macro when the Excel file is opened to rename the tabs?
View 1 Replies
View Related
Aug 19, 2004
Hi,
i transferred some data from a table to a txt file in DTS (Using some sort of SQT Tasks for updates and deletes.) Before i send it to another computer using FTP, i want to convert the txt file to cvs. Can you please tell me what code i can use?
Thanks.
View 1 Replies
View Related
Sep 19, 2007
I have a DTS package which executes an ActiveX control written in vbscript. I need to move the ActiveX code out of the DTS environment. The code is too big to execute in a Sql Server Job Step as type "ActiveX Script." Do I have any other easy options?
Thanks,
Michael
View 4 Replies
View Related
Dec 20, 2005
Hello!
Please help me
How I can runtime execute DTSExecSQLTask from ActiveX Script in the Transform Data Task
This package
ExecelConnection------ActiveXScript(runtime execute - SELECT MAX(ID)+1 FROM TABLE WHERE OURID=DTSSource("ID Our"))-------->SQLConnection
sorry for bad english.
Thank Thank you!
View 1 Replies
View Related
Apr 19, 2007
I'm looking for a way to refer to a package variable within any
Transact-SQL code included in either an Execute SQL or Execute T-SQL
task. If this can be done, I need to know the technique to use -
whether it's something similar to a parameter placeholder question
mark or something else.
FYI - I've been able to successfully execute Transact-SQL statements
within the Execute SQL task, so I don't think the Execute T-SQL task
is even necessary for this purpose.
View 5 Replies
View Related
Jul 28, 2006
This error occurs when the ActiveX task tries to execute:
[ActiveX Script Task] Error: Retrieving the file name for a component failed with error code 0x001B6438.
Anybody know how to troubleshoot these errors? I can't find anything on this error code. The same script works in DTS.
View 8 Replies
View Related
Apr 18, 2008
I found a example of using a button inside of a gridview at http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.buttonfield.aspx.I modified the code-behind and added: // Insert the producer into the database SqlDataSource sds = selectedRow.FindControl("sqlItemInsertIntoListing") as SqlDataSource; sds.Insert(); but the page throws an error.Can someone look at my code-behind and show me how to execute the line 56 in the code-behind? Thanks. Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 55: // Insert the producer into the databaseLine 56: SqlDataSource sds = selectedRow.FindControl("sqlItemInsertIntoListing") as SqlDataSource;Line 57: sds.Insert();Line 58:Line 59: } Below is my code: ASPX PAGE: <asp:Label ID="Message" ForeColor="Red" runat="server" AssociatedControlID="CustomersGridView" /> <!-- Populate the Columns collection declaratively. --> <asp:GridView ID="CustomersGridView" DataSourceID="CustomersSqlDataSource" DataKeyNames="ItemID" AutoGenerateColumns="False" OnRowCommand="CustomersGridView_RowCommand" runat="server" AllowPaging="True" AllowSorting="True" PageSize="50"> <Columns> <asp:BoundField DataField="ProducerName" HeaderText="Producer" SortExpression="ProducerName" /> <asp:BoundField DataField="ItemName" HeaderText="Item" SortExpression="ItemName" /> <asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" /> <asp:BoundField DataField="RegionMasterName" HeaderText="Region" SortExpression="RegionMasterName" /> <asp:BoundField DataField="CountryName" HeaderText="Country" SortExpression="CountryName" /> <asp:BoundField DataField="StateName" HeaderText="State" SortExpression="StateName" /> <asp:TemplateField HeaderText="ItemID" InsertVisible="False" Visible="false" SortExpression="ItemID"> <ItemTemplate> <asp:Label ID="ItemID" runat="server" Text='<%# Bind("ItemID") %>' Visible="false"></asp:Label> <asp:SqlDataSource ID="sqlItemInsertIntoPart" runat="server" ConnectionString="<%$ ConnectionStrings:VBJimboConn %>" InsertCommand="INSERT INTO [ZCPart] ([PartUserId], [PartItemID]) VALUES (@PartUserId, @PartItemID)" OnInserting="sqlItemInsertIntoPart_Inserting" > <InsertParameters> <asp:Parameter Name="PartUserId" /> <asp:ControlParameter Name="PartItemID" ControlID="ItemID" PropertyName="Text" Type="Int32" /> </InsertParameters> </asp:SqlDataSource> </ItemTemplate> </asp:TemplateField> <asp:ButtonField ButtonType="Button" CommandName="Select" Text="Add to Part" Visible="True" /> <asp:HyperLinkField DataNavigateUrlFields="ItemID" DataNavigateUrlFormatString="ItemDetails.aspx?ItemID={0}" Text="Details" /> </Columns> </asp:GridView> <asp:SqlDataSource ID="CustomersSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:CONNSTG %>"....> </asp:SqlDataSource> CODE-BEHIND:using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;partial class Inventory_InventoryList : System.Web.UI.Page{ protected void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { if (!User.Identity.IsAuthenticated) { CustomersGridView.Columns[CustomersGridView.Columns.Count - 2].Visible = false; } } } protected void sqlItemInsertIntoPart_Inserting(object sender, System.Web.UI.WebControls.SqlDataSourceCommandEventArgs e) { e.Command.Parameters["@PartUserId"].Value = Membership.GetUser().ProviderUserKey; }// Source for gvInventoryList to display message: http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.buttonfield.aspx protected void CustomersGridView_RowCommand(Object sender, GridViewCommandEventArgs e) { // If multiple ButtonField column fields are used, use the // CommandName property to determine which button was clicked. if(e.CommandName=="Select") { // Convert the row index stored in the CommandArgument // property to an Integer. int index = Convert.ToInt32(e.CommandArgument); // Get the last name of the selected author from the appropriate // cell in the GridView control. GridViewRow selectedRow = CustomersGridView.Rows[index]; TableCell contactName = selectedRow.Cells[1]; string contact = contactName.Text; // Display the selected author. Message.Text = "You selected " + contact + "."; // Insert the producer into the database SqlDataSource sds = selectedRow.FindControl("sqlItemInsertIntoListing") as SqlDataSource; sds.Insert(); } }}
View 2 Replies
View Related
Mar 31, 2005
How can I execute am .sql script that was generated from SQL Server?
View 4 Replies
View Related
Feb 17, 2004
Hi all,
I have some problem to need you all help. My problem is i have a Excel Worksheet with VBA coding, in VBA code it have modules,function and sub procedures. after that, i change the VBA coding in add-in file and save as .xla to make the user friendly.
But now, i need to use DTS to automatic to execute the excel file that contain VBA code every week. This is because the VBA in excel cannot automation excute by every week. So, i need use DTS to make it automation. The problem is i don't know how to use the DTS function to call the addin excel to execute? Which the connection and task compenent should i use? Or how do i paste the VBA code in DTS?
DTS is very new for me, are any help can provide me the solution? thanks
Regards,
Andy :confused:
View 5 Replies
View Related
Feb 15, 2006
Hi,
is it possible to to modify/add to QA (using options ,macro ..)to execute line bellow on run of each script opened
from *.sql file
select
'script= put you file name'+ char(13)+
'server = ' + cast(@@servername as char(20))+ char(13)+
'dbname= ' + cast(DB_NAME()as char(20)) + char(13) +
'execution date= '+ cast(getdate()as char(24))+ char(13)+
'executed by = '+ system_user
thanks
Alex
View 2 Replies
View Related
Dec 30, 2005
i have a piece of code in an adp that is currently behind a form but i could put it in a module and make it public if i need to. how can I use DTS to run this piece of code? which connection and task could i use. can this even be done? i have little experiance with DTS.
thanks.
justin
View 1 Replies
View Related
Mar 19, 2008
I am creating a stored procedure to generate the sp_addrolemember syntax, since SQL 2005 does not script role members. The stored procedure is named sp_ so it can be executed from any database. However, any reference to a view beginning with sys. only gets executed in the master database and not the current database. Why?
Try this code for a test.
Use Master
GO
Create Procedure sp_test as
Begin
Select g.name, u.name
From sys.database_principals u,
sys.database_principals g,
sys.database_role_members m
Where g.principal_id = m.role_principal_id
And u.principal_id = m.member_principal_id
And u.name <> 'dbo'
Order by g.name, u.name
End
-- Run sp_test from a database containing fixed database role members. The select only runs against master and not the current DB.
View 4 Replies
View Related
Dec 2, 2007
Hi I have a console application from which I want to execute a package.
How can I do it. Can you also tell me what references I need to include to make the code compile.
Please I need to do it ASAP. Can any one help me with this.
Thanks
Sai
View 5 Replies
View Related
Mar 29, 2007
is this possible? if so, how?
thanks
View 4 Replies
View Related
Mar 26, 2008
Hi all,
I am excuting DTS package from code behind and the table is created in the SQL database. However, the data in my excel sheet is not transferred over and Im not sure where the problem lies. Below is my code:
pkgLocation = @"C:/Program Files/test.dtsx";
app = new Application();
pkg = app.LoadPackage(pkgLocation,null);
pkgResults = pkg.Execute(); Any advice is much appreciated.
View 4 Replies
View Related
Apr 2, 2008
Hi,
Is it possible to connect to a database and fetch data from it from within custom code inside a report?
Appreciate any help.
Regards,
Asim.
View 4 Replies
View Related
Mar 15, 2008
hi all
I have to execute the stored procedure from code file
string constr = ConfigurationSettings.AppSettings["ConnectionString"];SqlConnection con = new SqlConnection(constr);con.Open();SqlCommand cmd = new SqlCommand("GetTax",con);cmd.CommandType = CommandType.StoredProcedure;SqlParameter paramFrom = new SqlParameter("@from", SqlDbType.VarChar, 50);paramFrom.Value = "JFK";SqlParameter paramTo = new SqlParameter("@To", SqlDbType.VarChar,50);paramTo.Value = "HOU";SqlParameter paramAirline = new SqlParameter("@Airline", SqlDbType.VarChar,50);paramAirline.Value = "US";SqlParameter rpTax = new SqlParameter("@Tax",SqlDbType.Int);rpTax.Direction = ParameterDirection.Output;cmd.Parameters.Add(rpTax);
insted of this way can i execute stored procedure any other way
like
exec MystoredProc "param1"."param2","param3"
i appreciate u r help
View 2 Replies
View Related
Sep 11, 2006
Hi!
Is it possible to execute a SSIS package using Java? How?
Thank you!
View 1 Replies
View Related
Nov 27, 2006
Hi you all,
In abc.aspx, I use a GridView and a SqlDataSource with a SelectCommand. The GridView's DataSourceID is the SqlDataSource.
In abc.aspx.cs, I would like to use an IF statement in which if a criterion is not satistied then I will use the SqlDataSource with another SelectCommand string. Unfortunately, I have yet to know how to write code lines in order to do that with the SqlDataSource. Plz help me out!
View 1 Replies
View Related
Apr 15, 1999
hi, I need to run a batch file in specific time of the week. can anyone show me the code to run a batch file with both ways: window nt schedualer and ms sql server task manger.... I do appreciate your help
Ali
View 5 Replies
View Related
Jan 18, 2008
Can anyone tell me how to capture the return code of a process launched by an Execute Process Task? I am able to capture the output by using the StandardOutputVariable but can't seem to capture the actual code.
View 4 Replies
View Related
Jul 5, 2006
In Executing "E:EmailDelivery.exe" "EP12A 4" at "", The process exit code was "-532459699" while the expected was "0".
View 4 Replies
View Related
Jan 2, 2008
Hi all,
I have the following T-SQL code of Common Table Express (CTE) that works in the SQL Server Management Studio Express (SSMSE):
--CTE.sql--
USE ChemAveRpd
GO
WITH PivotedLabTests AS
(
SELECT LT.AnalyteName, LT.Unit,
Prim = MIN(CASE S.SampleType WHEN 'Primary' THEN LT.Result END),
Dupl = MIN(CASE S.SampleType WHEN 'Duplicate' THEN LT.Result END),
QA = MIN(CASE S.SampleType WHEN 'QA' THEN LT.Result END)
FROM LabTests LT
JOIN Samples S ON LT.SampleID = S.SampleID
GROUP BY LT.AnalyteName, LT.Unit
)
SELECT AnalyteName, Unit, avg1 = (abs(Prim + Dupl)) / 2,
avg2 = (abs(Prim + QA)) / 2,
avg3 = (abs(Dupl + QA)) / 2,
RPD1 = (abs(Prim - Dupl) / abs(Prim + Dupl)) * 2,
RPD2 = (abs(Prim - QA) / abs(Prim + QA)) * 2,
RPD3 = (abs(Dupl - QA) / abs(Dupl + QA)) * 2
FROM PivotedLabTests
GO
===========================================
How can I execute this set of the CTE.sql code in the VB 2005 Express via the Stored Procedure programming?
Please help and respond.
Thanks in advance,
Scott Chang
View 1 Replies
View Related
Jun 11, 2015
I have a requirement in which i have to create a custom .net class library for Ex:-I retrieve password(s) from a thrid party component. Below is what i am doing.
(1) Created a custom class library which reads a custom .xml file from a drive Ex:- "D:MyAppMYAppCofig.xml" and sets to my properties of my custom class library and inside it i created an instance of third party component's class and passed these values. Since i need to use this .net custom class library both in web and ssis/database side i am using this custom .xml file.
(2) After validating passed data (properties set in custom .net class library) the thrid party component instance object created in my custom .net class libraty returs a password to me own custom .net class libray.
(3) This password I use in my web app for connecting to database. This code is working fine.
(4) My question is how to execute a custom .net class library code through ssis and to use the my same custom .net class library and pass the password to my SSIS component / taks so that that code block also uses the returned password to connect and do any needed tasks? In other words how to use custom .net class library from SSIS.
My Environment is as follows:-
SQL Server is : 2008 R2
VS.NET 2013
View 5 Replies
View Related
May 28, 2008
I'm having a hard time locating a listing of potential error codes and the meanings for the Execute Process Task component...can someone assist?
Thanks
View 1 Replies
View Related
Jul 26, 2004
Our IT department says to me all a stored procedure is, is a Macro. This is what Our network tech says to me. There are days I just want slap these people. This is the same one that made the Flat File comment, I think databases are very important and can be very complex I get annoyed when they IT people make them seems as if they are of no importance at all.
Venting again sorry
View 9 Replies
View Related
Sep 22, 2004
Has anyone ever tried to run a stored procedure through a macro before?? And If so do you get a message that says that the stored procedure exectuted successfully but a macro Halt macro message that says "Action Failed"?? Now the stored procedure executes just fine its just that the macro itself is having some trouble. Can anyone help me?? please
View 8 Replies
View Related
Jan 21, 2005
hi,
I have already set up a DTS package to convert my data to an excel file and I would like to alter the format of my data through my DTS without having to write a macro.
Do you know how to do this?
View 2 Replies
View Related
Apr 19, 2008
Hi,
I have Marco Dreamweaver 8 and SQL. I don't know how to tied them up. Anyone who can help me?
Thanks
View 12 Replies
View Related
Aug 27, 2005
Having trouble with this assignment. My teachers say it should work but itjust doesn't. This part of a macro is designed to take payment from the costand show the balance owing. What am I doing wrong. The sql is shown below.No error message is showing but the process still dosen't work.UPDATE [wedding] INNER JOIN deal ON wedding.deal = deal.deal SETwedding.balance = (deal!cost - [wedding]!paid)
View 1 Replies
View Related
May 21, 2002
Hi all,
I am trying to run a Excel macro from a DTS package.I've created the macro and Batch file to run a macro, and i am executing a batch file from DTS package.I am able to run a macro when i am executing a DTS package manually.but its not working when i schedule the process. any solutions?
its not the security problem also.I've checked it.
View 1 Replies
View Related