|
Make a left join on the second table. Where there are no record in the second table, the values will be null, so you can select the records where the key from the second table is null.
select ...
from table1 as t1
left join table2 as t2 on t2.id = t1.id
where t2.id is null
---
Year happy = new Year(2007);
|
|
|
|
|
Sir,
If I have four tables , named table1 , table2 , table3 , table4.
and I have to pick those records from table1,table2,table3 , which are not present in table4.
Then the same query is not working
I am doing in the following way.
select t1.Contact_Id
from tblConact_Master as t1,tbl_Contact_Address as t3
left join tblrcdetail as t2 on (t2.Contact_id = t1.Contact_Id and t2.contact_id = t3.Contact_Id)
where t2.Contact_id is null
Please help.
Thanks and regards
Pankaj
-- modified at 4:33 Wednesday 17th January, 2007
|
|
|
|
|
select table1.contact_id
from table1, table2, table3
where table1.contact_id = table2.contact_id and
table1.contact_id = table3.contact_id and
table1.contact_id not in (select contact_id from table4)
|
|
|
|
|
I'm going out on a limb with this one, but I was wondering if there is a simple way to do global error handling?
Meaning, for all errors that my code, fails to capture, a certain segment of code is executed. This will then report the error to me via email or a DB entry etc.
If this is not possible it will mean that my program has to have emaculate error handling, which, in this case, is easier said than done.
(VB.Net 2005)
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Sure there is but it may not always prove to be user friendly.
For WinForms...
One of the new features of VB.NET 2005 is the ability to specify code to run when your app encounters an unhandled exception. You can set this up by going into the code editor of the Application.Designer.vb file & writing or referencing code for the MyApplication_UnhandledException event. By default the Application.Designer.vb file is hidden & it is not recommended to modify it directly but this is the only way I know to set this up.
You can also get all information regarding the exception (including stack trace, etc.) from the EventArgs passed to the handler.
I wouldn't recommend this to be the only way you handle errors in your code tho. It's a nice feature but not a replacement for good coding & planning.
For WebApps...
What I usually do is set it up using a Global.asax file. The Global.asax file has an Application_Error event handler that handles any errors that occur in your web app. You can log these errors using the Server.GetLastError() method & then redirect the user to a custom error page or whatever.
Hope that helps.
|
|
|
|
|
Yes, you can put a try catch at the top level, and also there are two events you can subscribe to ( forget what they are right now ), then you can write whatever code you like. My release apps always catch all exceptions and generate a log, it's indispensible when you have issues on a client machine only.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
how can I create a vertical label in VB6
Hello Friends
|
|
|
|
|
Make a normal label, then turn your screen on it's side
I couln't find any other way! Perhaps you can download a vertical font and use an array of labels to display single letters below one-another?
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Can I make a Crystal Report using dataview?
Suman
|
|
|
|
|
I am Developing the software for consultancy. The main theme of project is to automate whole recruiters process. Ex:- Usually the recruiter logon into their Website, download the resume and verify whether its matching for their clients Requirements or not. If its matching then only they Forward it. This is the major process.
"Resume Sourcing" is a module in my project. In that, I want to fetch all the fields from the resume like:
Candidate Name , Date of Birth , Father’s Name , Contact , Details/Address , City , Location , Contact No. , Phone (Rest) , Mobile No. , E-Mail ID , Languages Known , Passport No. , Gender , Martial Status , Alternate E-mail ID , Resume Title , Objective , Summary , Total Years of Experience , Area of Interest , Current organization , From Date , To , Date , Company Name , CTC , Training Undergone , Current Industry Type , Current Functional Area , Role , Total Expertise , Level of Current Organization
I want to gather information from the resume in any format like .doc, .rtf, .htm
Plz give me suggestions and guidence to success the module.
Thanks & Regards
-- modified at 2:54 Wednesday 17th January, 2007
-- modified at 2:56 Wednesday 17th January, 2007
Kumaran
|
|
|
|
|
Well, HTM is easy, if it's XHTML. If not, it's still plain text, and so can be parsed. Lots of ugly string mashing code in your future
You can control Word via the Office toolkit, or something like that, it's an SDK you need to download.
I believe a rich text box can read RTF
No matter how you look at it, I see a lot of ugly string mashing code in your future, unless the resumes are standardised, I doubt you'll get 100% success.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote: No matter how you look at it, I see a lot of ugly string mashing code in your future, unless the resumes are standardised, I doubt you'll get 100% success.
Oh yeah... Regular Expression will help, but they too will be ugly!
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|
|
imagine this ... i got a parent class , i got a sub class
public class parent
.... public properties and methods here
end class
public class subclass
inherits parent
....public properties and methods here
end class
Ok i declare the following
dim a as parent
a = new subclass
so far so good! but then the problem is that i cannot access my sub classes properties. only the parent classes properties are visible?
is there something i've missed?
how do i declare an object of type parent and still access the subclass properties.
I can store an object of subclass in a place set up to store objects of the parent class right? but then why can't i access the properties of the subclass?
i.e
Private _vehiclesInLane As New LinkedList(Of Vehicle)
dim v as vehicle
v = new car
_vehiclesInLane.AddFirst(v)
Ok so theres no errors here during compile! i can access the parent class properties but not the child ? how comes
I hope theres somebody who can help me... Thanks in advance
|
|
|
|
|
moize12 wrote: only the parent classes properties are visible?
Of course. You can cast a to be a subclass, or assign a to a variable that is of the subclass type, but a is a parent, it only knows about parent methods.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
moize12 wrote: is there something i've missed?
Obviously.
moize12 wrote: how do i declare an object of type parent and still access the subclass properties.
You don't. As long as you treat the object as an instance of the parent class, it works as an instance of the parent class, so it only has the members that the parent class has.
If you want to access the members of the sub class, you have to cast the reference into the sub class so that you treat the instance as the actual object that it is.
Something related that you might want to look into is virtual methods. You can have a virtual method in the parent class and override it in the sub class. When you call the method, it will use the method in the actual class of the object, regardless of the type of reference you use to access the object.
---
Year happy = new Year(2007);
|
|
|
|
|
moize12 wrote: dim a as parent
a = new subclass
I know you can cast to a subtype but I think perhaps you should instantiate your classes as the type they were declared as. This is neater & makes your code easier to understand & follow. What I mean is you should rather keep it as
Dim a As Parent<br />
a = New Parent
That's just my opinion tho.
|
|
|
|
|
MaxLength of textbox in Vb.Net is counted by character.
In English, 1 character = 1 byte. But in many different languages, 1 character = 2 bytes.
So if you set MaxLength of textbox is 10. It means you can enter 10 characters in textbox. It's wrong, because if 1 character = 2 bytes then you have 20 bytes. And you can't insert that value into database.
So how could i check MaxLength of textbox by bytes ( not by character )?
|
|
|
|
|
Actually, in .NET, strings are always unicode. The MaxLength is the number of characters, regardless of space taken. It would be stupid for it to mean anything else.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Greetings all,
I was reading the msdn on a comparison between Windows Installer and ClickOnce and it says that windows installer has an automatic update option, but you have to write something into the application that programmatically checks for updates.
Can anyone point me in a direction that would help out with this? I don't even know where to start looking. I just need a simple updater that checks a text file on the server and downloads & installs the updates. I noticed on this site there is an autoupdating article, but it says it's only for intrAnet... that doesn't help me unfortunately :-/
I was also reading that you can do this with something like... bit shifting or merging or something to update specific files, I lost the link to that and cannot find it again.
Really, I want to eventually get a some of the data into dlls, which I have been playing with, and then only update the dlls when errors are found, but this is a lower priority than just getting the updater to work. So, any help is much appreciated!
Thanks,
Mike
MultiPlayer Online, Turn based strategy games that I am working on can be found at: 1483online.com and Thermopylae-Online.com ;-D, Thanks!
|
|
|
|
|
I am writing a small text editor and I am able to open a word document but unable to save it how can I do this in VB.net.
Below is the code that I have for opening a word doc.
Case "doc"<br />
objWord = CreateObject("Word.Application")<br />
objDoc = objWord.Documents.Open(OFD1.FileName, , True, , , , , , , , , False)<br />
objDoc.Select()<br />
rtbText.Text = objWord.Selection.Text<br />
objDoc.Close()<br />
objWord.Quit()<br />
End Select
|
|
|
|
|
1) I cannot see you making any changes to the Word doc in the code.
2) You have not called the Save method - does the True param in the Open method mean Save on close? If not, you need to call the Save method on objDoc.
Shreekar
|
|
|
|
|
To be honest I've no idea what the True param is for in the Open method as it is code that I downloaded from one of the code sites. I've deleted it all, so that now I just have objDoc = objWord.Documents.Open(OFD1.FileName) It has made no difference to the program.
Here is what I am using to try and save the document,
Case ".DOC"<br />
<br />
objWord = CreateObject("Word.Application")<br />
objTempDoc = objWord.Documents.Add<br />
objWord.Visible = False<br />
<br />
' Position Word off the screen...this keeps Word invisible <br />
' throughout.<br />
objWord.WindowState = 0<br />
objWord.Top = -3000<br />
' Copy the contents of the textbox to the clipboard<br />
Clipboard.SetDataObject(rtbText.Text)<br />
With objTempDoc<br />
.Content.Paste()<br />
.Activate()<br />
.Save()<br />
objWord.visible = False ' This line of code fixes the error<br />
.Close()<br />
End With<br />
objWord.Quit()
If it would help, I could zip it up and upload it to my site so that you can take a proper look at what I'm trying to do.
|
|
|
|
|
Would not you like to give a name and path to the temp doc while/before saving it?
Anybloodyid wrote: objWord.visible = False ' This line of code fixes the error
Which error?
And finally, what is NOT working currently (I am assuming the temp doc is not saved) and what is the error that is thrown?
Shreekar
|
|
|
|
|
objWord.visible = False ' This line of code fixes the error
Oops this should not be there, ignore it, I've now removed it from the code.
If the temp doc is saved in rtf then all is ok, but if I save it as a word doc then it is saved but loses all it's formating
I'm thinking of just saving docs as rtf or plain text I think it's quicker.
Or maybe saving in my own format *.qwt can this be done?
|
|
|
|
|
Hi,
I'm using VB.NET 2005 Express, and I want to create a price break DataGrid having three columns, with an unknown number of rows.
In column 0, I want "From"
In column 1, I want "To"
In column 2, I want "Price"
That bit is easy enough.
The complicated bit, for me, is applying a min and max to the "From" and "To" cells. So, for example, if the user has entered ...
From|To|Price
1|9|5.00
... on the first row, when the user comes to add the next row, I want the "From" cell on the new row to only accept a value greater than 9, so the table may look like ...
From|To|Price
1|9|5.00
10|20|4.50
Any help would be greatly appreciated.
|
|
|
|
|