In a form, I have a Combobox (named cbArt) with the values: 1, 2, 3 and 4 I have a table with the fields: Id, art, name, width I wanna put a datagridview in my form, so always I change the value in the CbArt the Datagridview shows me the fields with this SQL: "select * from artigos where art='" & cbart & "'" But, how can I pass the value of the cbart to my Datagridview's SQL?
I'm develloping a small application over na Access 2007 database. how can i pass the value of a combobox to a query being built with the query builder tool?If I use ? in the Filter column I�m prompted to enter the value but what I need is to pass the value of a combobox in a form. I tried to use:
HTML =MyForm.MycomboBox.Value
but it is ignored, interpreted as the value to be filtered.
I am trying to write a routine to bind a combobox to a datasource (coming from a LINQ query)and at the same time populate the "autocomplete" collection of the combo box:
i am very new to VB. I am working on file operation such as show files, copy file, delete file, show current directory, rename folder, make folder. My problem right now is with delete and copy file. I have a method of delete and copy but i dont know how to pass this method on a button.
Suppose I save a file as *.tar (this extension is my own making) using a vb6 program.Now when the user clicks this file, the window asks 'with what program to open this file' and he/she selects the exe of my program. Now I want to pass the name of file clicked to my program. Like when we click *.xls file, the exe of Excel program knows which file has been opened or clicked. Is there a way?
I want to create a file to pass to another exe. Used File.Exits and then File.Create. But File.Create returns a FileStream, so I should close the file??
I 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'm working on a VB.NET DLL right now, and one of the functions I'm writing is supposed to take a file, and clip out an array of bytes (the method I've got works, and can be abstracted away here). What's the best way to pass a file to this function? Would passing a filename to it be best, or what would be the best way to accomplish this?
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..
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.....
Im really newbie in VB.NET and i hope that someone could explain how may i do this successful,ok im explaining now.I had two richtextboxes and one button First richtextbox contains the following text:<user_register.php: 2012-02-21 00:03:49
POST username=sexhunger15 email=ho_t@hotmail.com email_confirm= password=vergota
Suppose I save a file as *.tar (this extension is my own making) using a vb6 program. Now when the user clicks this file, the window asks 'with what program to open this file' and he/she selects the exe of my program. Now I want to pass the name of file clicked to my program. Like when we click *.xls file, the exe of Excel program knows which file has been opened or clicked. Is there a way?
Passing variables from .bat file to vbscript. I have .bat file that launches test.vbs. I need to pass variable defined in the batch file inside the .vbs file.
the batch file contains the code
set /p var= please enter the value: cscript test.vbs "%var%"
Where as test .vbs has the following codes
Dim StrText MsgBox StrText
In my requirement value assigned to variable 'var' in batch should assign to StrText variable in the test.vbs and then it should display in VB message box.
How would one go about sending parameters to the application? For example, I want to send my exe some switches or parameters. my_app.exe -param1 -param2 Something like that. Then I can use the para1 and param2 throughout the exe Possible? But it is not command line, it is gui based.
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.
my problem is that my company does not want to serve up the .json MIME type, so I have to use ASP.NET to fetch the JSON file from the file server. Currently I have jQuery that does a getJSON and traverses the JSON object to build certain elements of the page. Is there a way I can use ASP.NET (VB) to give the object to my jQuery script after I fetch it?
I have 2 programs. Prog1.exe is in folder1 Prog2.exe is in folder1/subfolder
When I execute this in Prog1, Process.Start("subfolder/Prog2.exe") Prog2 runs.
But...When I execute this in Prog2, Dim sw as new streamwriter("1.txt") sw.write("something") sw.close
1.txt is created in folder1, and not subfolder. I can do a easy workaround by passing the full file path when creating the streamwriter, but I just want to know if it's a bug or what.
How do i pass the combo box value to some batch file.The UI will have following parameters:Month (for which user wants to generate the report) Full name of the month e.g. January, February etc. Year (for which user wants to generate the report) YYYY e.g. 2009 We will use the following approach:User will select the month and year as per requisition. From dotNet call a batch file, and pass the selected parameters to the batch file
I 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.
I am using XML literals to parse files that contain data. I was wondering if there is a way to take a section of the xml file and pass it as a variable to another function...
<XML> <DATA> <STUFF> <blahblah>sdfsdf</blahblah>
[code].....
I know with XML literals I can use ...<STUFF> and get the info out of that section, but how can I take an entire section of the xml, like MORESTUFF and set it as a variable to pass to another function that can parse that xml?
i have a text file that contains words.. how would i get each line and pass it to a variable.here how it goes: string variable where each line will be passed and for each line will be passed to a function
Trying to convert XML file to string and pass to stored procedure. Dim fs As FileStream = File.Open(fileUpload1.PostedFile.FileName, FileMode.Open, FileAccess.Read) Dim buffer(fs.Length) As Byte fs.Read(buffer, 0, fs.Length - 1) txtRawXML.Text = System.Text.ASCIIEncoding.ASCII.GetString(buffer)
When I tried to upload file I got error. The error description is 'A name contained an invalid character.'. Could not find prepared statement with handle 0. Could not find prepared statement with handle 0. sp_xml_removedocument: The value supplied for parameter number 1 is invalid. The statement has been terminated.
There r 7 numbers in each row and need to read each of that and store it as an integer value ...I tried the following code..
Imports System
Imports System.IO
Imports System.Collections[code].....
This works and is showing each number by number ...But is there a way to store each number to another variable...something like a(1)=1, b(1)=0...., a(2)=2, b(2)=0......
EDIT: I am able to pass in the string perfectly when using Visual Studio 2005. But when using VS 2003 and a loiwer .net framework it will not let me, unless I hard code it in.
Could something be enabled/disabled on one of these instances of VS? Or could this just be an error with the older versions of .net? I think I am using 1.1??(will have to check) in 2003.
I've been looking at accessing shared folders, read and write, via the network without being prompted by the OS for the username and password.
On this forum, and googling, I can find many things about accessing network shares, but none using code which also passes the username and password required.
What I'm basically looking for is to not have to map a drive on the users computer. Then using code, write or read files from a network share and at the same time pass the username / password required for that network share.