|
nope no inheritance, so im gna try an make the properties public an check. thanks
Nothing lasts but nothing is lost
|
|
|
|
|
OK. Well if that works, you should then alter the keyword to the least access required. Maybe 'Friend'.
Depending on what you choose, you may have to qualify the property with the class name e.g.
classname.property
Public properties are accessible even outside your application which presents a security issue. Only use public if you want them to accessed in this way.
Steve
|
|
|
|
|
just tried it now, didnt work. the textboxes appear empty on the new form
off the topic, can u give me a theoretical answer to how one would solve concurrency errors please.
thank you
Nothing lasts but nothing is lost
|
|
|
|
|
If the form/class is closed/terminated then you will not be able to get the properties. They will need to be initialised first.
Why are you putting them in a class?
What concurrency errors are you getting?
Steve
|
|
|
|
|
the table is a table holding customer information, so i display it on a form, then if one highlites a row on the table in the datagrid and clicks on edit it supposed to bring up a form with the selected rows information displayed in textboxes for editing purposes.
not getting any concurrency errors, need a theoretical solution for documentation purposes.
Nothing lasts but nothing is lost
|
|
|
|
|
OK. So your datagrid is bound to a dataset table?
Can't you just get the record ID from the row clicked and pass that value to the WHERE clause of the other form's query/DataAdapter/DataReader?
If the datagrid is bound to a dataset table, why not edit it in the grid and update the dataset table?
You should post your concurrency question as a separate item.
You will get better response that way.
General theory is to 'handle' the errors somehow. For example:
Execute the command to update the database from within a Try...Catch block.
If an exception is raised, inspect the Catch statement's Row property to determine what caused the violation.
Add code to resolve the error based on your application's business rules.
Is that what you are looking for?
Steve
|
|
|
|
|
Yeah it is bound. so u suggestin i use an SQL statement to retreive the row of the table?
k im gna look into tht and give it a go
i did post it in the general section but no response yet
yeah tht is sort of what im looking for, but somehthing more high level, coz its for people that hardly know anything about code.
Nothing lasts but nothing is lost
|
|
|
|
|
Absolutely. The data is there in the dataset.
Just get the record ID from the grid row clicked.
Use something like:
SelectedRow = myGrid.CurrentCell.RowNumber
RecordID = myGrid.Item(SelectedRow, ColumnIndex)
Where 'ColumnIndex' is the index of the column containing the unique ID of the record. Then use that value in your query for the form.
Depending on how your form is set up, you could just find the record in the dataset and set your form's BindingContext to that position.
I don't mean to sound like an over-bearing parent but, if you had given that detailed explanation earlier, we could have got to this point much quicker!
Well, I'm sure you can make something high level out of that?
For example:
Use structured error handling to catch concurrency errors and resolve errors by utilising code that conforms to business rules...etc
Steve
-- modified at 21:14 Thursday 3rd August, 2006
|
|
|
|
|
Thanks alot mate!! i really appreciate u helping me and sorry about being so indetailed earlier, bit tired its late here by us.
cheers
Nothing lasts but nothing is lost
|
|
|
|
|
No problem. It's late here too! 2:25 AM in UK!
Steve
|
|
|
|
|
Could someone help me with this problem?
My main form is MDI form i.e. frmMain
I have a search screen that appears i.e. frmSearch
Depending on the criteria on the search another form will appear i.e. frmCriteria
Problem
How can I keep the form frmCriteria within the MDI form, frmMain.
In the frmSearch form I have the following code at the moment
Dim frmCriteria As New frmCriteriaForm
If bExists = True Then
Me.Close()
frmCriteriaForm.ShowDialog()
Me.Close()
End If
What is the correct syntax to enable to keep form frmCriteria with the mdi form. I have frmMain as IsMdiContainer = True
I have tried using mdiParent but keep getting it wrong. I am doing something wrong. i.e. frmCriteriaForm.mdiParent = frmMain <-- what should the property be after frmMain. I cannot use me as frmSearch has the me properties
|
|
|
|
|
You need to open the form as an MDIChild and set its parent property.
Use a procedure similar to the following:
Dim NewMDIChild As New frmCriteriaForm()
'Set the Parent Form of the Child window.
NewMDIChild.MdiParent = Me 'frmMain
'Display the new form.
NewMDIChild.Show()
Steve
|
|
|
|
|
I need your help with developing a login screen using vb,net where the user must scan their finger print on a scanner.Please help.
kagiso
|
|
|
|
|
matjame wrote: where the user must scan their finger print on a scanner
I take it you have the documentation for this fingerprint reader, because most certainly we are unlikely to have any.
|
|
|
|
|
I have the documentations and the SDK, but need to use the scanner to log the user in with their finger print.I have every thing but don know where to start with the code, in vb.net
kagiso
|
|
|
|
|
matjame wrote: I have the documentations and the SDK
matjame wrote: I have every thing but don know where to start with the code, in vb.net
You have the documentation, which is more that what we have. I suggest you start by reading the documentation.
|
|
|
|
|
i need how to display html in the form og vb.net when i click a button how i make a print previw of this page like windows
and how to change the skin of the button and the skin of the form
|
|
|
|
|
If you have several questions, would you please at least write them in separate sentences? And a more descriptive subject would also be helpful.
-- modified at 18:17 Thursday 3rd August, 2006
---
b { font-weight: normal; }
|
|
|
|
|
hellow to all ..
can anyone help me with how to use ScrollBars ? and how to put it with picturebox ? any samples ?
thxx ...
|
|
|
|
|
It would help if you mentioned what you want these scroll bars to do...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ok ,
i have a really width photo that i would like to show ,
the photo in width do not fit the screen so what i am trying to do is to have a scroll that when i go to the right i can see the rest of the photo
thank u in advance , for anyhelp ..
|
|
|
|
|
|
Easy. Put a Panel on your form, then put a PictureBox in the Panel. Make sure the Panel's AutoScroll property and the PictureBox AutoSize properties are set to True.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Woah! Nice one Dave!
Steve
|
|
|
|
|
I had to make one of these for an application I wrote a while back. Turned it into it's own control in about 10 minutes and now it sits in the GAC and has it's cozy little place in my Toolbox.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|