Run Bat File With Parameter?
Mar 11, 2010Dim Files As String() = Directory.GetFiles(StrTempFolderPath)
Dim Filename As String
Dim File_name As String = ""
[Code].....
Dim Files As String() = Directory.GetFiles(StrTempFolderPath)
Dim Filename As String
Dim File_name As String = ""
[Code].....
Following code doesnt work and raise error "A parameter is missing. [ Parameter ordinal = 1 ]".What s wrong with it?I am developing pocket pc application in vs 2008 and sqlce 3.5 sp1.
[code]....
I'm Trying to Call the Stored Procedure which has one input Parameter and one output parameter . VB.net code is below
[Code].....
I want to have a "template" function that can receive different parameter and a type parameter, like:[code]But Vb told me that tupeList is not defined... is there a way I can do that?
View 2 RepliesI want to know can i access parameter exe using vb.net or c#.net.
View 1 RepliesI am currently still learning to use VB.Net feature. Currently I am trying to execute a .exe file where there will be passing parameters to run the script. E.g. this how it works on the command prompt line:
C:Documents and Settingsproject1>textfile.exe file1.txt file2.txt file3.txt file4.txt
Above line will be able to run the textfile.exe script.
I am using VB .Net to create a User Interface where user will be able to use the 'OPEN CLICK' button to choose the files (which will display on a textbox) and click on a 'START' button to run the program. I managed to find a code - process.start() feature, however it cant seem to work..
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim MyProg As String
Dim executable As String
executable = "C:Documents and Settingsproject1 extfile.exe"
MyProg = TextBox1.Text
Process.Start(x, MyProg)
I have a non-graphical ocx file (most of the information I found through a google search seemed to say most ocx files are graphical libraries or some such) that I am trying to use in a Visual Basic project. I think everything is set up correctly now, the program is basically a small GUI that lets the user select a file, which the OCX library is used to interact with (as the files are on the order of 1-20 GB, that is why a OCX file is used)
Problem 1: The OpenFile method in the OCX file needs a LPCSTR as the parameter, I haven't been able to get Visual Basic to give me that. I saw CStr() and decided to try that, since I know I want a C String, or at least I think that is what the lpCStr means, but then when that failed I read the documentation for CStr from Microsoft and saw that wasn't what I needed.
Problem 2: I haven't used Visual Basic, or Basic at all, in over 10 years now I think. And that was just to create a small calculator. So assume I know nothing.
I've been using Java for a little over 2 years now, and know some C/C++, and python and a couple other things, so I am not completely hopeless, just can't find much information on how to do this in Visual Basic on the internet. I'm using Visual Basic Express 2010.
i need to run a dos command with parameter and write out on text file from my win form , i am not using shell command and the code is -
[Code]...
Is it possible to make a procedure have a single parameter but the values for that parameter are more than one? I have this procedure:
Public Sub autoComplete(ByVal cboCombo As ComboBox)
With cboCombo
.AutoCompleteMode = AutoCompleteMode.Append[code]....
Now I was wondering if there is a way to use it like this:
autoComplete(myCombobox1, myCombobox2, myCombobox3)
Or can I use a procedure like this with 'With...End With'?
I have a method which requires a parameter to be passed in. I would like to use the Addhandler to call the method through a dynamically created button control's click event.
When I include () in the AddressOf, VS complains: 'AddressOf' operand must be the name of a method (without parentheses).
When I exclude the brackets, VS complains: Method '...' does not have a signature compatible with delegate...
My code:
CODE:
One of the things that I think is really cool about VB.NET is how built-in functions and subs have extra help text in their ToolTips like "Expression: String expression to search for replace string." as well as the usual "Replace(...parameters...) as string" text. So are the pop up boxes with things like "CompareMethod.Binary" or "CompareMethod.Text." And finally I like how some functions and subs have different sets of parameters for the same routine. For example, New FileStream() starts with either a path (string) parameter or handle parameter, but none of the 15 sets of parameters contain both path and handle parameters. Is there a way that I can set up the classes and functions I write to use these things or do they only work with built in classes and functions? If there is a way, what are the proper names for them so I can look them up in the VS/VB documentation? I would be happy enough if someone would give me an example of them, but it would be nicer if I could go through the documentation and find out if there are other cool things that are related or near by.
View 3 RepliesIn my VB.NET project I wanted to run a JAR file in a separate thread. Now the question : Is it possible to pass parameters to a JAR file during run time from VB.NET??
View 1 RepliesI have a RDCL Report called Report1.RDCL.In this report I put an image box named logo the select image Source is set to EXTERNAL and in the use this image I have Parameters!LogoPath.Value.
View 2 RepliesI have a SSIS package that just makes a folder (Child package) and i have a second package (parent) that calls the first package using a script task and the code is like [code]I want to pass the XML file as a parameter ,what the XML file does is that it has Variable for a folder name, so that if i like to change the folder name (making new folder), I can change it in the XML file and the parent pakage will call the child pakage with the XML file as a parameter.
View 1 RepliesIn this report I put an image box named logo the select image Source is set to EXTERNAL and in the use this image I have Parameters!LogoPath.Value.I would like the users to be able to pick their own logo.
View 1 RepliesHere is my problem: I developed one application in VB.Net in VS 2008 Express Edition on MS Vista. I published the application and created the installation setup. Now when I install this application on any Vista machine, it runs without any problems, but if I install it on an XP machine, the installation is clean, but when I launch the application, it ends abruptly without any warnings/error just after the splash screen.
Then to investigate further what I did was that I copied the source project from my VS 2008 Express Edition on Vista to an XP machine having full (VS 2008 Team System) version , and when I try to compile it there (XP/VS2008 Full), I get one error in one of the forms resx file. Incidently this is the same form that gets loaded after the splash screen. So I see there is some correlation between my application ending just after the splash screen and failing to compile the main form of the application. The error that I get reads like: "Invalid resx file. The parameter is incorrect Line 1374, position 5."
have an idea on what i am doing wrong here:
Compiler Error Message: BC30455: Argument not specified for parameter 'dteRDate' of 'Public Sub New(strOName As String, strOAdd As String, intOPhone As Integer, strVer As String, dteRDate As Date, dteWDate As Date, strONote As String, strOrName As
[code].....
I have a vbscript that runs under asp page. I need convert the code to VB.NET
SET objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = Application(DB)
With objCommand
[code]....
What is the VB.Net that will do exactly the vbscript does? I like paramer(0) and 1 and 2 etc since I don't need to define the parameter(0) as integer or varchar etc. I remembered I have discuss this before and it is possible to do in VB.NET?
I have a single instance app that is working fine except for this strange (to me) issue.
The user could double click on FileA and my app opens and displays the file contents (the path of FileA has been passed as a parameter) No problem there. The problem is that if the user then double clicks on FileB and I read the parameter it still contains the path to FileA. What trick am i missing here?
(If i add a debug line that forces the code to be FileB's path the the app works correctly in terms of opening a new tab, reading the contents etc.) (vb.net 2010)
i want to learn about dll injection....lets start with small thing...i created a dll file contain 1 function "MyMsgBox" get one parameter and return non...i want to inject it to another proccess exe file and execute the code...
View 3 RepliesWhen I try to call System.IO.File.Encrypt() on an existing file, it throws a generic IOException, and the message is "Parameter is incorrect". System.IO.File.Encrypt("C:ProjectStorageDirectoryfile.txt")
The current user the process is running under has full control to the "StorageDirectory" folder. Is there something I'm missing permissions-wise?
where i put the *'s i get the error "The parameter 'address' cannot be an empty string. Parameter name: address".
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim mail As New MailMessage()
Dim SmtpServer As New SmtpClient
[code].....
My query is this:
"SELECT TOP 5 * FROM [TableName] ORDER By NEWID()"
But I want to use a SQL Parameter so it could be something like this:
"SELECT TOP @ParameterName * FROM [TableName] ORDER By NEWID()"
The normal way dosen't work:
Ct.Command.CommandText = "SELECT TOP @ParameterName * FROM [TableName] ORDER By NEWID()"
Ct.Command.Parameters.AddWithValue("@ParameterName", SomeValue)
How can I add a Parameter in this situation?
Can anyone see what I am doing wrong here? the page should "YES This is a test"
Partial Public Class testForm1
Inherits System.Web.UI.Page
Private Property test() As String
Get
'if is in session, return it, otherwise look it up
[Code]...
in my app I use my sql commands with parameters. Now, I can't save the data in the database, because a parameter has an empty string value instead of a numeric value. And I want to know, which parameter it is. This command has 31 parameters.
My questions:
1. How can I loop through the parameters and print out it's values?
2. How can I print out the sql command with it's parameter values? (if it's possible).
When I execute this on MS ACCESS SQL window I have no problem I just enter the value of product_id_fk but when I run it on vb.net application I got No parameter value [Code]
View 10 RepliesI need to convert some code from c# to VB.NET from this page.
SafeFileHandle inputHandle = null;
SafeFileHandle outputHandle = null;
SafeFileHandle errorHandle = null;
[Code]...
I want use a continuewith with a sub that have a parameter.See my exemple:
Public Sub a()
Dim t1 As New System.Threading.Tasks.Task(AddressOf b, 10)
Dim t2 As System.Threading.Tasks.Task[code].....
One way or another I need to link groupID (and one other integer) to the button I am dynamically adding.
[Code]...
I have a report already setup on the ReportServer. And its subscription as well. What I'm trying to do is add the ParameterValue "CC" and some email addresses then send the email out. It doesn't seem to work.
My code:
Dim emailReader As SqlDataReader = selCount.ExecuteReader
Dim emailsTest As List(Of String) = New List(Of String)
[code].....