Make sure that your function/sub procedure handles BUTTONNAME.Clic k
i.e.
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
'Do some stuff here
End Sub
User Profile
Collapse
-
Yeah you can do it a couple of ways 2 ways are:
1.) You can use DTS to import data into a table
2.) You can connect to the Excel file using something like ado and then write to a SQL table via ado
use connectionstrin gs.com to get the connectino strings
PaulLeave a comment:
-
Net TIME for VB.NET
is there a function that will return the time on another computer? -
Hmmm I bet you're not properly executing your code in a seperate thread.
I had to create a class that had a sub procedure
then create a new thread for it
then start the thread.
You might want to try that. If you need further explanation let me know.
PaulLeave a comment:
-
In SQL ' is the equivalent of ""
so to fix it:
str= " o''clok "
that's two single quotes
you could also
str = replace("o'clok ", "'", "''")
PaulLeave a comment:
-
Maybe I'm not understanding, but if you declare the singleton class as a global variable wouldn't that make all of its properties globally accessible?
Singleton o;
private void()
{
o = new Singleton;
o.LocalVariable = AllAbsentPeople ;
}
private AddUser()
{
o.LocalVariable = AllAbsentPeople + NewAbsentPerson
}
Recently I've only been programming...Leave a comment:
-
-
click
[START] >> [RUN] >> then type "services.m sc"
if you see MSSQL$SQLSERVER then you can use
"Data Source=(local)\ SQLSERVER;Initi al Catalog=pubs;Us er Id=;Password=;"
or
"Server=(local) \SQLSERVER;Data base=pubs;User ID=;Password=;T rusted_Connecti on=False"
if you don't see that then I'm guessing that MUM2 is the name of your computer and in that case...Leave a comment:
-
ctype (string, command) :: Execute string as a comand
Hi All,
I'm trying ot make a error handler function. I want the error handler function to return a command:
Resume
Resume Next
Exit Sub
I know how to return it as a sting but I don't now how to convert that string to a command. I was trying something like:
ctype(Function( Err), Command)
but there is no command so I don't know what to cast the string to. Can anyone help?... -
When you declare the controls you need to declare them "WithEvents "
and then you can code a handler to handle those events.Leave a comment:
-
Thanks sainin!
That was exactly what I was looking for. I got my cancel button working and everything is right in the world :-).
Thank you to everyone else as well!
PaulLeave a comment:
-
Thanks I'll try this.
I tried this without waiting for the search thread to finish, so the variable that I passed between the threads was = to Nothing. Because of the blank variable I thought that you weren't able to pass variables between the two threads, but now I'm thinking that the search thread hadn't gotten to the part where it added something to the variable when the main thread looked at my variable.
I think I'm on...Leave a comment:
-
I'm re-writing this because the last one seemed confusing. I didn't see an edit function either.
------------------------------------------------------------------------------------------------------------
Yes I tried using a seperate thread and a backgroundworke r to accomplish this but I can't update the UI from the seperate thread. It returns cross thread errors. So after the search is done I can't update the user interface...Leave a comment:
-
Yes I tried using a seperate thread and a backgroundworke r to accomplish this but I can't update the UI from the seperate thread. It returns cross thread errors. How do I update the controls on one thread from another thread? So after the search is done I can't update the user interface to let the user know about the results. Therefore making the search futile.
Thanks the logic of the search function is fine. It runs and...Leave a comment:
-
How do I cancel?
Hi all. I'm a relatively young developer without any formal training so please pardon me if this question is stupid.
I created a program to search a database. You enter a value into a textbox and it queries the database searching for this value. Then it displays the results in a listview.
While the program is searching it's in a "Not Responding" state, and the program looks like it is frozen. Additionally you...
No activity results to display
Show More
Leave a comment: