|
Will there always be a record in purchases that corresponds to each employee record? If not you may want to use a LEFT OUTER JOIN (same syntax as above I believe but replace INNER JOIN with LEFT OUTER JOIN).
If you have an employee record that has no purchases records and you use an inner join, that employee record won't show up because there's no purchases to go with it. If you use an outer join the employee record will show up with a null in the purchases field(s).
Hope that helps.
Denise "Hypermommy" Duggan
|
|
|
|
|
Hi to Everybody,
I'm using a MDIContainer with VB2005
From this Form I open a MDIChild1
From this one I need to open a new MDIChild2 Form as MDIChild Form, but I need to show it as modal because I need to do some operation only after that the MDIChild2 is closed
I try to better explain:
I Wrote:
Dim childForm As New frmMain
childForm.Text = GESTIONE_PROGETTO
childForm.MdiParent = MDIParent1
childForm.Show
...
updateGrid()
It works fine, but the Procedure UpdateGrid run even if the childForm is still open...
I Wrote:
frmMain.ShowDialog()
updateGrid()
It works fine, but the frmMain is not contained into the first form
I Wrote:
Dim childForm As New frmMain
childForm.Text = GESTIONE_PROGETTO
childForm.MdiParent = MDIParent1
childForm.ShowDialog()
updateGrid()
It doesn't work because "Form that is not a top-level form cannot be displayed as a modal dialog box. Remove the form from any parent form before calling showDialog."
Do you have some suggestions???
Best regards
Leonardo
|
|
|
|
|
If it's Modal - why would you expect to be able to contain it in your MDIParent?
There are two solutions to this. The first (best) is to subscribe to the FormClosed event of the child, and call UpdateGrid from the event handler.
The other is to force the dialog to be constrained to the client area of the parent. This is a little tricky but possible. I wrote on article on this some time ago. I need to revisit it to clean it up a little, and it's in C#, but it should be obvious enough how I've done it so you can translate. Link[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
leozampa74 wrote: From this one I need to open a new MDIChild2 Form as MDIChild Form, but I need to show it as modal
MDI Child forms cannot be shown modal.
I think you need to rethink your design. I'm wondering why everyone thinks that Multiple DOCUMENT Interface means that they can show MDIChild forms as dialogs. A dialog does not edit a document, so what's the point?
|
|
|
|
|
I need 2 MDIChild becasuse the same ChildForm need to access to the same MDIParent Menu.
At the same time i need that the first child Form wait until the second child Form is closed.
For this reason i need MDI and Modal too.
Probably you're right, I need to rethink my design.
For the moment I'm trying to add some instructions to the formClosingevent on the second Form, but I think is not so good.
I'm not a visual basic expert, i use it only 100hours per year. Could you advice me?
|
|
|
|
|
You're missing point. Multiple DOCUMENT Interface means that each MdiChild form is designed to edit a particular document or set of data, completely independant of other MDIChild forms.
If you have one MDIChild waiting on another MDIChild, you've got a serious design flaw.
|
|
|
|
|
Hi all,
I am very new to VB so please forgive my basic questions.
I have a webcontrol on a form that I use to populate fields on a webpage. The web page has an add another line function that in turn adds more fields to the form.
So basically I need to check if a field exists before setting the value.
WebBrowser2.Document.GetElementsByTagName("input").Item(22).SetAttribute("Value", Value) Works, but as I stated I need to check if item(22) exists before setting it's value.
Thanks in advance for your help it really is appreciated.
Paul.
|
|
|
|
|
What happens when you try to retrieve the value from an item that does not exist?
My advice is free, and you may get what you paid for.
|
|
|
|
|
Following error:
System.ArgumentOutOfRangeException was unhandled
Message="Value of '25' is not valid for 'index'. 'index' should be between 0 and 20. Parameter name: index"
Thanks for your response... much appreciated.
Paul.
|
|
|
|
|
So there is an index with a certain size at any time.
Before you try to set the value of an element, just check that the index number of that element is smaller than the length of the array.
In pseudo code:
If the_index_number_of_the_item_you_want_to_check >= items.Count Then
'write to the item or not (I am not sure what you are trying to do)
End If
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi Thanks again,
I think I understand, but please forgive my newbieness.
I dont know how to reference this index, I've tried several ways, but I feel like i'm shooting in the dark.
If WebBrowser2.Document.GetElementsByTagName("input").item(22) >= 1 Gives the following error:
I get an error value is not a member of 'System.Windows.Forms.HtmlElement'
What I thought I could do which also fails is:
If Exists WebBrowser2.Document.GetElementsByTagName("input").item(22) then ..... else ......
Paul.
|
|
|
|
|
WebBrowser2.Document.GetElementsByTagName("input").Count will give you the number of items at that moment. So that is the number that you can check against.
The question is, where / how / why did you determine to do something with item(22) specifically (22 being the key question here)?
In other words your code should look something like:
If 22 > WebBrowser2.Document.GetElementsByTagName("input").Count Then
'do something here
End If
Except that instead of 22 it really should be something like:
Dim i As Integer
'The value of i should become 22 due to some logic,
'but for the purpose of the conversation I am
'just going to assign it the value straight out.
i = 22
If i > WebBrowser2.Document.GetElementsByTagName("input").Count Then
'Item(i), in other words Item(22), does not exist
'Now that you know this, do what you want here.
End If
The test you ran earlier tells us that at that exact moment Item(20) was the maximum existing number. So you shouldn't be trying to write to Item(22).
My advice is free, and you may get what you paid for.
|
|
|
|
|
Thanks very much works great now.
Paul.
|
|
|
|
|
Hi
While using source code from
http://www.codeproject.com/kb/dotnet/ShareObjDotNet.aspx
dll Nepal.utilities.Miscellaneaous is missing
Please provide dll
Thanks
|
|
|
|
|
You need to ask the author of that article via by posting a message at the bottom of the page you linked to.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi,
I have to create a form in VB/VB.net that can write records on a mdb file on my website and also retrieve records from it.
I have never done any web programming, so I want to know how I can do it. Are there any sample codes available on the web? or can someone suggest me a book which explains such work.
Thanks and regards,
Neil Ranjan
|
|
|
|
|
Well look at this
http://www.google.co.za/search?hl=en&q=Introduction+to+ado.net+oledb&meta=&aq=f&oq=[^]
Did you look at this ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Please do not post in two forums, with the same question. Very rude.
Select which forum you feel is most appropriate and post there, just there.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
I want to create log for both success and failure of transaction in database and not only for exceptions(errors)
In Enterprise Library, Can i do logging in case of exceptions only?
Thanks
modified on Thursday, July 30, 2009 3:20 AM
|
|
|
|
|
Stick your logging into the finally block
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You mean using enterprise library I can do the logging out of catch block also?
Can u please provide me link for the same? Actually i am searchin for the articles and everywhere logging is done in catch block only and i think it is for exceptions only
|
|
|
|
|
It really isn't all that mysterious:
'Dim variables that you want to pass to the Catch or Finally clauses here,
'outside the Try Catch Finally block.
Try
'Your transaction takes place here
'Monitor any return value from your transaction (rows affected for example)
'and log success or failure based on the outcome here.
'Or if no errors occur you can simply log success here
Catch ex As Exception
'if an error occurs log the error here
Finally
'if you want to log something, no matter what happens, do it here.
End Try
My advice is free, and you may get what you paid for.
|
|
|
|
|
Please confirm that the code is also for logging using Enterprise library.
Also can u provide a sample code link that tells that the logging in Enetrprise library can be done in any part of the function?
|
|
|
|
|
Having no experience with Enterprise Library myself, I would guess something like:
Dim logEntry As LogEntry
Try
'Your transaction takes place here
LogEntry = New LogEntry()
logEntry.EventId = 100
logEntry.Priority = 2
logEntry.Message = "Success or failure"
logEntry.Categories.Add("Trace")
logEntry.Categories.Add("UI Events")
Logger.Write(logEntry)
'Or
LogEntry = New LogEntry()
logEntry.EventId = 100
logEntry.Priority = 2
logEntry.Message = "Success"
logEntry.Categories.Add("Trace")
logEntry.Categories.Add("UI Events")
Logger.Write(logEntry)
Catch ex As Exception
LogEntry = New LogEntry()
LogEntry = New LogEntry()
logEntry.EventId = 100
logEntry.Priority = 2
logEntry.Message = "Error"
logEntry.Categories.Add("Trace")
logEntry.Categories.Add("UI Events")
Logger.Write(logEntry)
Finally
LogEntry = New LogEntry()
logEntry.EventId = 100
logEntry.Priority = 2
logEntry.Message = "Anyway"
logEntry.Categories.Add("Trace")
logEntry.Categories.Add("UI Events")
Logger.Write(logEntry)
End Try
My advice is free, and you may get what you paid for.
|
|
|
|
|
I am doing in window aplication.
Got teh folowing crash by execution the code provided by you.
The type initializer for 'Microsoft.Practices.EnterpriseLibrary.Logging.Logger'
threw an exception.
I am uisng the following Dll reference.
Microsodt.Practices.EnterpriseLibrary.Common
Microsoft.Practise.EnterpriseLibrary.Logging
Is there anything that i need to do in addition to the above said
|
|
|
|