|
Hi.
How do I search anything in datasets or datatables? Are there any methods for this?
WofR
|
|
|
|
|
By searching, I assume you are referring to searching records.
If so then,
Dataset - Cannot really search records in a collection of datatables!
Datatable - you can create a view out of it and apply a filter on it.
Shreekar
|
|
|
|
|
You can create a BindingSource if you haven't already and do the following:
MyBindingSource.Position = MyBindingSource.Find("Column Name",Key) Where key is the primary key value of the record you require.
This code will cause the BindingSource to jump to the specified method, if you don't want to jump, don't set the .Position property. The .Find property returns an index to the BindingSource's list.
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
Depending on what you are doing the DataSet.Select(string) function can be usefull. Where String is the where clause of a SQL Statement, AND not to terribly complicated.
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|
|
:-DHow to connect excel databse in VB or VB.net
raviuday
|
|
|
|
|
Google has the answer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Const testStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source={0};" & _
"Extended Properties=""Excel 8.0;HDR=No;IMEX=1"""
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|
|
Sir/Madam,
I am facing a problem in implementing a query in vb.net.
I have two tables.
named table1 , table2
I have to pick those records from table1 which are not present in table2.
Id is primary in table1 and foreign in table2
For that i am using the following query.
SELECT table1.Id
from
table1,table2
where
table1.Id<>table2.id
Please help.
Thanks and Regards
Pankaj
-- modified at 4:01 Wednesday 17th January, 2007
|
|
|
|
|
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 )?
|
|
|
|