|
Hello
I have a linklabel, when i press the first time it do a specific job
the second time i clicked it do another job
How can differ between first click and the second one.
Thank you in advance
Assaf
|
|
|
|
|
You need to handle the click event and set a flag so you know if it was clicked before, and respond accordingly
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I'm sorry can you give ore hint about this subject
because i fail to do this
With my regard
Assaf
|
|
|
|
|
Have a bool variable that is set to false.
bool is1stMethodDone=false;
in the click method:
if(is1stMethodDone)
{
do some code...
is1stMethodDone=true;
}
else
{
do some other code...
}
-- modified at 18:10 Monday 7th August, 2006
|
|
|
|
|
I found this error when i run the function
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. no work was done.
basicly i trying to refer to the No. and retrieve the information form the access to my VB6data report. Which i doing is delivery order report.
i create a data enviroment and my command i put the sql command which it "select * from DO where [NO]= " & dorder.dono.text"
is the .. SQL problem.. or.. others.? cause i when i test on the form which it able to retrieve to the form but problem come out in data report..
|
|
|
|
|
hello friends,
i have to develop a software for placement activity in MBA college.
the project requires
1.The TPO should sent a notice to students on their respective Laptops.
2.Students should reply to the request sent by the TPO.
3.Students will be provided Login-id's and passwords through which they can access this software.
So my query is whether the software should be installed on the client side or server side.
And which programming languages will make this work.
from bhavik parekh
|
|
|
|
|
|
If the only functionality is for a message to be sent, and then replied to, do you really need a full application? What's wrong with just sending out emails?
Otherwise, I'd suggest doing a full pros and cons list of the sensible approaches (web-based, distributed client, client-server...)
As for language, there aren't many modern languages that can't do what you are after. I'd suggest working out how you wish to implement it before deciding on a language to use.
|
|
|
|
|
i finish work in school project but i don't know how make permission
for example no body can open or deal with trasury menu or dir it's details or salary or money in or out from treasury except accountant
mangers can see all schedules and edit in it .teachers can not edit schedule
how i can security level for persons use my application
answer me quickly thanks
ma_refay
|
|
|
|
|
I used to design this application for my own for assignment purpose. But it just a simple application which link from Visual Basic to Access database. What I have done is created a table to store user name, password and table to identify group membership. Then I defined my own rule to assign permission to the group which user belong too. Then you need to write code to check user membership in order to define permission for user access an application.
|
|
|
|
|
Hi
When a user chooses an item in a combobox by clicking the item the event SelectionChangeCommitted runs, but if a user chooses an item by writing the item (I'm using findstring) the event doesn't run. Is there a way I can make that happen.
Please help me.
Fia
|
|
|
|
|
hi all..
i've bit confuse about MSCOMM. actually, i want to know how vb send the data?? how many bit does vb send the data??
for example:
MSComm1.Output = Chr$(255) & Chr$(PinNumber)
how many bits that the PinNumber is holding right now??
areon25
|
|
|
|
|
Hi, I am using VS.Net 2002 edition with the 1.1 framework both at University and at home (my home copy is from University using the University licence so I presume is exactly the same)
I have created a front-end application for SQLite (an open source DBMS) which creates databases for users with no SQL knowledge. I link to the DBMS using a .dll file.
When I fill a dataset with the contents of a table at University it works fine then goes onto fill a datagrid with this information. Yet when I run the same application at home I get a "Specified cast is not valid" error.
Not one thing changes to the application, the data in the table, the .dll file, everything is the same in the two instances yet one works and the other doesn't.
Does anyone know what is wrong, if I need to change a setting or install an update on my home PC or something?
Any help is greatly appreciated.
I have included my code and highlighted where the error shows up although I do not believe my code to be the problem as like I said it works on the University PC's.
Many thanks
John
Code for populating dataset and datagrid
Private Sub cmbInsertData_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbInsertData.SelectedIndexChanged<br />
Dim dset As DataSet '= New DataSet()<br />
If Len(cmbInsertData.SelectedItem) < 1 Then<br />
MessageBox.Show("Please choose a table to view")<br />
Else<br />
Try<br />
tblName = (cmbInsertData.Text)<br />
setTableName(tblName)<br />
dbConn.openExistingDatabse("Data Source=" & getDBName() & ";Version=3;New=False;Compress=True;")<br />
dbConn.createSQLCommand()<br />
Try<br />
dset = dbConn.selectAll("SELECT * FROM " & tblName, tblName)<br />
Catch es As Exception<br />
MessageBox.Show("error here -" & es.Message)<br />
End Try<br />
StoreDataSet.setDataSet(dset)<br />
DataGrid1.DataSource = dset.Tables(0).DefaultView<br />
Catch es As Exception<br />
MessageBox.Show(es.Message)<br />
End Try<br />
End If<br />
End Sub
Public Function selectAll(ByVal strSQL As String, ByVal tableName As String)<br />
Dim dset As DataSet = New DataSet()<br />
sqlite_cmd.CommandText = (strSQL)<br />
sqlite_datareader = sqlite_cmd.ExecuteReader()<br />
<br />
Dim sqlite_dataAdapter As SQLiteDataAdapter = New SQLiteDataAdapter(strSQL, sqlite_conn)<br />
sqlite_commandBuilder = New SQLiteCommandBuilder(sqlite_dataAdapter)<br />
sqlite_dataAdapter.Fill(dset, tableName)<br />
Return dset<br />
End Function
|
|
|
|
|
What you need to find out is what is getting casted? What is it? What is it being cast to?
At the moment you catch the exception and throw away all the good information.
|
|
|
|
|
Hi Colin, I am not really sure what you mean, how do I get all the other good information? I have been taught this way at University so as not to crash out the program.
What I find odd is that it can work on one machine and not the other.
|
|
|
|
|
Do you have a missing reference?
The machine at Uni may have a DLL that is not present on your machine or you may need to set up the reference again if it is a different location or version.
Steve
|
|
|
|
|
Hi Steve, I have tried re-referencing all the references which are present, this does not fix the error. Is there anyway I could find out what DLL could be missing or should I just leave it and be thankful it works at University?
John
|
|
|
|
|
You should be notified in the Task List if your project detects a missing reference.
What line of code is causing the error?
It is not highlited as you stated in your original post.
Steve
|
|
|
|
|
I get the impression that his code is compiling. The message he mentions suggests that he has got the code running. A missing referrence would mean the code wouldn't compile. Of course, he could be running the binaries he compiled at uni'.
|
|
|
|
|
Yes. I agree. Just a thought...
Steve
|
|
|
|
|
No I am not notified of a missing reference, sorry, I did highlight the line but then when I put the code in code tags it must have got rid of the bold, the line that causes the error is this one :-
dset = dbConn.selectAll("SELECT * FROM " & tblName, tblName)
John
|
|
|
|
|
What is 'dbConn'?
I'm confused how selectAll is a method of dbConn...
Steve
|
|
|
|
|
dbConnection is a class I created with all functions in that deal with the database.
In the forms I want to connect to the database I put this line of code:-
Dim dbConn As dbConnection = New dbConnection()
selectAll is a function I created to select all from the given table name, put the contents into a dataSet and display in a DataGrid.
|
|
|
|
|
What is the definition of this 'selectAll' method?
Steve
|
|
|
|
|
This is the selectAll code, I just called it selectAll(select *) as that is what I am doing from the database, selecting all from a table and displaying it to the user.
Public Function selectAll(ByVal strSQL As String, ByVal tableName As String)<br />
Dim dset As DataSet = New DataSet()<br />
sqlite_cmd.CommandText = (strSQL)<br />
sqlite_datareader = sqlite_cmd.ExecuteReader()<br />
<br />
Dim sqlite_dataAdapter As SQLiteDataAdapter = New SQLiteDataAdapter(strSQL, sqlite_conn)<br />
sqlite_commandBuilder = New SQLiteCommandBuilder(sqlite_dataAdapter)<br />
sqlite_dataAdapter.Fill(dset, tableName)<br />
Return dset<br />
End Function
|
|
|
|