Dynamically Pass The Source Filename To A Dts Package?

Apr 14, 2011

Using VB 2008 and SQL 2000. Converting code from VB6. I need to dynamically pass the source filename to a dts package. The assignment statement doesn't seem to work. What am I doing wrong or what do I need to do differently?

Private Function RunDTS(ByVal strPkg As String, ByVal strServer As String, ByVal strFile As String, ByVal strBatch As String, ByVal strEmployee As String) As Integer
Dim v As DTS.GlobalVariable2
Dim pkg As New DTS.Package

[code]....

View 4 Replies


ADVERTISEMENT

C# - Pass Collections Of Data To PL/SQL Package Procedure Or Function From .NET?

Aug 27, 2009

I have a table that I need to insert a set of records into based on user input. IE: Selection from a list of items to choose from. For this example, let's just say it's a collection of int's.

Not a lot of good examples on the internet. There's only one related question here on SO, but it lends no answers either (both answers are dead ends).

How do you setup the call into the Package from .NET? How do you setup the Package Procedure or Function to receive the collection? How do you process the collection once inside of the Procedure or Function?

View 3 Replies

Destroy AcroRd32 - Pass The Filename And Path To Open The Pdf

Jul 22, 2009

Using vb.net 2008 I have a form with a PDFViewer control. I pass the filename and path to open the pdf. When the form is closed, AcroRd32.exe is not destroyed. It remains in Task Manager even after I've completely closed the application. The more pdf files I open, the more memory used. How can I destroy? I've tried setting the control = nothing, ctrl.dispose but neither is working. What am I doing wrong?

View 5 Replies

Dynamically Pass Values To An Object?

Mar 28, 2011

How can I do this:

Dim oMyObject As New MyObject
oMyObject.DoSomething("Parameter1","Parameter2")

The "DoSomething" and the two parameters are dynamically provided from another script. They are stored in a string object in this script: sAction & sParameters. My question is how can I dynamically pass the "sAction" to the object oMyObject.For example oMyObject.sAction (where sAction should be the value stored in the sAction string). The example will probably not work. Is there a way to do this? The idea behind is to avoid having to write each function hardcoded, like:

If sAction = "DoSomething" then
oMyObject.DoSomething(sParameters)
ElseIf sAction = "AnotherThing" then

[code]....

View 5 Replies

Pass Stored Procedure Name Dynamically To Linq-to-SQL?

Jul 11, 2011

How can I pass stored procedure name dynamically to Linq-to-SQL, vb.net and get the result into a datatable.

View 2 Replies

Loading Output From Package Out Of A Local Package Error

Mar 24, 2010

I am trying to run the application created in the example at [URL] The code errors at the line dtsDataReader = dtsCommand.ExecuteReader(CommandBehavior.Default)
the error is A requested parameter does not exist in the package. I have checked everything that i can think of in the package Also when I try to run the package using the dtexecui utility I two errors "Error: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW.

[Code]...

View 1 Replies

VB2010 Use An Application To Package All Files Together Into A Setup Package

Feb 26, 2011

I am wanting to use an application to package all my files together into a setup package. I have tried InstallShield 2011, but when i click on Visual Basic .net wizard, it tells me I do not have Visual Studio.NET installed on my system. I am currently using VB2010 Express How can I fix this... or is there a better application available for packaging?

View 2 Replies

Get Columns Names From Table And Pass Parameters Dynamically?

Sep 14, 2011

I am trying to figure out how to do this or if it is even possible. I believe it should be, I have about 20 different tables with different amounts of columns in each table. I.E. One table might only have 4 columns while another might have 30 columns. What I am trying to do is create 1 sub/funtion that will handle the select and import for all 20 different tables, unfortunately for me I can't seem to figure out how to write this.

I know the select statement for getting the column names is :

SELECT column_name FROM INFORMATION_SCHEMA.Columns where TABLE_NAME = 'table'

View 4 Replies

Get Values From Dynamically Added Controls And Pass It To Webservice?

Jan 12, 2011

I get values from web service:

Dim ctr As Integer = 100
Dim ctr2 As Integer = 145
Dim ctr3 As Integer = -2

[code].....

View 4 Replies

Pass A Reference To A Form To Dynamically Compiled Code?

Mar 6, 2011

I am trying to create a application scripting environment for my VB .Net application. I have a form type in the application called Project. What I want to do is dynamically compile (i.e Eval) VB .Net code on a Project form. This dynamic code always has a Main function. One of the arguments to Main is a reference to the calling Project form. Here is the Eval code:

Public Function Eval(ByVal vbCode As String, ByRef MyAssembly As System.Reflection.Assembly, ByRef ProjectForm As Project) As ArrayList
Dim Provider As VBCodeProvider = CodeDomProvider.CreateProvider("VisualBasic")

[code].....

View 1 Replies

Pass Database Name Dynamically To Crystal Report In 2005?

Jun 10, 2011

dynamically passing image to crystal report from a disk in vb.net 2005

View 1 Replies

Pass The Values From The Dynamically Added Textbox To A Web Service?

Jan 12, 2011

I created 5 textboxes using runtime controls:

For i As Integer = 0 To 4
Dim custom As New TextBox
custom.Name = "Custom" & i

[Code]....

how can I get those values and then pass it to a web service? (This should happen when i click the submit button)

View 6 Replies

Asp.net - Pass Values From Dynamically Created Gridview Checkboxes To A Crystal Report?

Nov 1, 2010

Does anyone know how to pass values from adynamically created gridview checkboxes to a crystal report?Is it possible? I am using asp.net, vb.net and mssql. Here's my grid minus a few boundfields:

<asp:gridview id="grid" runat="server" autogeneratecolumns="False" cellpadding="4"
forecolor="#333333" gridlines="None" emptydatatext="No Products registered for this company...">
<RowStyle BackColor="#EFF3FB" />[code]............

View 1 Replies

VS 2008 Scan A Long String And Return Any Values That Occur Between The Tags <FileName> And </FileName>?

Jul 1, 2009

Quick query...I'm trying to scan a long string and return any values that occur between the tags <FileName> and </FileName> I've got a bit of code here to use regular expressions to return the position of the occurunces of both substrings..Just wanted to find out if there is any way to scan for both substrings within one loop (as im currently doing 2, one for the first substring and one for the 2nd) so I can use something along these lines:

ringlist = Mid(XMLRESP, (startloc + 1), (endloc - 1))
MsgBox(ringlist)

to msg box the value between the substrings...either that or another approach to return the value between the 2 substrings (it can be of variable length)

Dim patternstart As String = "<FileName>"
Dim patternend As String = "</FileName>"
Dim matchesstart As MatchCollection = Regex.Matches(XMLRESP, patternstart)

[code].....

View 3 Replies

Remove The Filename And Extract Just The Path Of The OpenFileDialog.Filename Property?

Oct 17, 2010

How would I do that? Sample code is below that demonstrated that the file I opened contained the full path and file name.

I want to extract just the path and serialize that to the user.config file as a UserSetting value. Then next time the user opens the dialog box, it uses that saved path string to go immediately to the location previously used.

If openFileDialog1.ShowDialog() = DialogResult.OK Then
Properties.Settings.Default.persistConnectionType = openFileDialog1.FileName
Properties.Settings.Default.Save();

[Code].....

View 3 Replies

Get The FileName For The Proces.Start(FileName) Method?

May 27, 2009

I have a Listview on my form with different files. I can selet a file en open it with the proces start method. To open the file i use the OpenFileDialog method and select the filename. This work very good. With the code below.

My question is if there is a method to get the selected file without using the OpenFileDialog Box. So when i dubbelclick the selected file the proces will start with open the selected file. Something like:

proc.StartInfo.FileName = Me.SelectedCell.FileName
instead of proc.StartInfo.FileName = Me.OpenFileDialog1.FileName

PS) May be i can preduce the Filename using the OpenFileDialog method on the background.

Private Sub ListView1_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDoubleClick
If Me.OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then

[Code]....

View 8 Replies

Transform An Address Like File:///d:filename.ext In A D:filename.ext

Jun 26, 2009

how do you transform an address like "file:///d:filename.ext" in "d:filename.ext"

without dirty string manipulation??

View 4 Replies

Run 2008 SSIS Package - Click A Button And Have A SSIS Package Execute?

Apr 14, 2011

I created a simple VB application in Visual Studio 2010.My computer, which I am using to create the program, is Windows 7 Pro, and SQL Server 2008 is running on a Windows Server 2008 Enterprise, which I have full access to.

I want to click a button and have an SSIS package execute.I looked around on the Internet and found examples, but they do not seem to work for me.I try to add a reference, Microsoft.SqlServer.ManagedDTS.dll, as a few sites advise, but it is not listed when I go to PROJECT>ADD REFERENCE.

I also type:

Imports Microsoft.SqlServer.Dts.Runtime but all I get is a squiggly green line, which when hovered over states "Namespace or type specified in the Imports 'Microsoft.SqlServer .Dts.Runtime' doesn't contain any public member or cannot be found." Below is some code I copied from one of the websites and pasted in my button click event (the path is correct), but a get blue squiggly lines under "Package" and "DTSExecResult":

Dim pkgLocation
As String
Dim pkg As
New Package[code]....

What can I do to make the SSIS package run when I click the button on the Windows application a created?

View 8 Replies

C# - Add A Reference To Some Source Code To Include In A Source File In .net, Winforms?

Jan 26, 2010

I don't know what this is called so I've struggled to find an answer from google but I have a vague memory of it from t'old days.I've sub-classed (* see below) about 8 framework controls, overriden some properties and added some functionality into each one.The changes I have made are identical in every case. If I make a change, I have to go through each class and apply the same change there.I was hoping there may be a keyword such as <IncludeSourcefile "common.vb> that I can put into each class.

(* note) I use the term sub-classed but I don't know if that's the correct terminology. I've also seen it used for call-backs. Is sub-classed the correct term to use?

View 6 Replies

Spacing HTML Source - Way To Space Out The Source Code Of A Web Page

Jan 6, 2011

Way to space out the source code of a web page, having each tag on one line, without having to search for each tag ending and then making a new line after.

My code for obtaining the source code is:

CODE:

Also if anyone knows a way to colour the tags.

View 1 Replies

VS 2005 Update Table - If All Results Is PASS Then The Table2 Should Be Updated As Pass

Jun 8, 2012

I have two tables:

table1

case_no flow result
tc_1 001 pass
tc_1 002 pass
tc_1 003 pass
tc_2 001 pass
tc_2 002 fail
tc_2 003 pass


table2"

case_no result
tc_1 pass
tc_2 fail

Table2 should be updates from table based on the results... If all results is PASS then the table2 should be updated as pass... if any result is FAIL then the entire case_no should be updates a s fail..

View 7 Replies

Dynamically Creating Methods For Dynamically Created Buttons?

Mar 15, 2011

I have this code.

Code:
Public Class Form1
Dim NPB As Button
Dim x As Integer

[code]....

As you can see, when I open a program from my menu, a new button will be created with text similar to this, "C:Program ". The button it self will not do anything. How can I create the method at the same time the button it is for is created? Also how can I change the text do that it gives me, for example, CCleaner.exe instead of the whole target path?

View 14 Replies

Sockets - VB9 .Net 3.5 (2008) Code Works On The First Pass.Then Second Pass It Just Hangs On

Jun 19, 2009

This code was working consistently, but now...This code works on the first pass.Then second pass it just hangs on Code:Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient() for about 2 minutesThen the code will fork for another pass, then fail.....

Code:Imports SystemImports System.TextImports System.Collections.GenericImports System.XmlImports System.Xml.LinqImports System.Net.Sockets

[CODE]....

View 2 Replies

Binding Source Filter In Access Data Source?

Oct 11, 2010

I have an Access database and I want to view on a datagridview specific rows. For that I used the following :

CasesBindingSource.Filter =
"OfferDate Between #1/1/1997# And #12/31/1997#"
Cases is the table, OfferDate a field of the table wich is DateTime type.

When I use Between operator I get the following error :The expression contains unsupported operator 'Between'.

View 2 Replies

Pass Data To Dialog - Manipulate And Pass Back?

Jan 15, 2010

Just started VB programming this week and have found a wealth of information about what I'm trying to do. Problem is, some of it is more complete than others.Here's what I'm trying to do:In Form1 (my main form), I want to instantiate a class that contains a couple of properties (speed setpoint and position setpoint). When I click a button, I want to pass this data to Form2 and populate two textboxes on Form2 with the properties of this object. I want to manipulate the property values on Form2 and click an OK button which closes the dialog and returns the manipulated data, updating the property values of the object. Here's the algorithm I'm following:1) On Form1, instantiate the class2) On Form1's "Pass Data" button click event handler, instantiate a Form2 object and invoke the ShowDialog method, passing the object as a parameter.

3) On Form2, overload the ShowDialog method to accept the object as a parameter and modify the method so that it returns the manipulated class data.4) On Form2, in the ShowDialog method, populate the textboxes with the class data that was passed in.Here's where I get stuck. If I press the OK button on Form2 (DialogResult.OK), it returns me to Form1, but what hook do I have in Form1 to receive the manipulated class data that the ShowDialog method is returning?Here's an example of what I'm thinking about:

Code:
Public Class Form1
Dim clsController1 As New MotionController

[code].....

I'm sure it's probably a very elementary question, but every explanation I've found seems to be incomplete.

View 2 Replies

Can't Run My MSI Package

Apr 16, 2010

I have a Visual Studio 2005 project. Formerly, all our PC's and servers were 32-bit but we have rearchitected everything and purchased new hardware and we are running 64-bit servers. Here is my scenario. I would like to convert my 2005 project to 2008, maybe that will solve all my problems, if you think so tell me and I will concentrate on that. But when I tried to convert the project via the Conversion Wizard, I got 102 compiler errors and I think there would be more but that was the max. So I gave in and just worked on it in VS2005 on a 32-bit machine. The solution consists of five projects, one is a web program, one is a windows service, one is a library and the other two are install programs - one for the web program, one for the windows service. I want to install the Windows Service on a test machine which is 64-bit. When I tried to run setup.exe on that machine, I got this error:MsiInstallProduct returned '1638'

View 2 Replies

[02 / 03] Can't Even Package?

Jan 28, 2009

I am basically an EAI consultant and for my work I took an initiative to develop a windows based GUI whose functionaility would be to simply execute a couple of Oracle SELECT queries and display the results in the form. I took the help of my friend who is a VB.NET expert and he was kind enough to develop the complete code for me within a day (He isn't available now).

[Code]...

View 6 Replies

App To Package An Application?

Aug 10, 2009

Is it possible to create an app. that collects info from the user, writes that info to a file then package another app with the file bundled with it.

View 1 Replies

Can't Package DLL And Ship With App

Apr 14, 2011

I need a DLL to be available to my app at runtime but the app has to be standalone with no installer so I can't package the DLL and ship with the app.I am using the technique discussed in this thread: url..That works perfectly. My problem is that I need to do the same thing with an additional DLL and I can't figure out how to do it. It would be easy enough to create a "stream2" and a "raw2" but how do I return both of them from the function? Or how do I only return the one that is needed at the time?

View 6 Replies

Deployment - Can't Even Package

Jan 28, 2009

I am basically an EAI consultant and for my work I took an initiative to develop a windows based GUI whose functionality would be to simply execute a couple of Oracle SELECT queries and display the results in the form. I took the help of my friend who is a VB.NET expert and he was kind enough to develop the complete code for me within a day (He isn't available now). The application did work fine and we tried to package into an MSI using the Deployment & Packaging Project option. Now when I installed the application on a different computer, it throws OraOps10.dll not found ! I also tried the Setup Wizard from the same Deployment & Packaging Project option but it results in the same error.

Please note the following:

-> We used .NET 1.1 and the backend database is Oracle 10g.
-> We downloaded the Oracle Data Access components for .NET from Oracle's website. The DLL file in the error message actually came with this installation.

When I am packaging the solution, I expected all the dependencies including this OraOps10.dll should have also been packaged. What could go wrong here? I don't think I can request my customer to install the Oracle Data Access components for .NET, in this case we don't even need a packaging feature. I would be grateful to you guys if this silly issue is fixed very soon.

View 2 Replies







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