niyati Level: Scholar
 Registered: 01-02-2006 Posts: 35
|
String Function needed
Hello Friends,
I am doing a project is visual Basic 6.0.The thing is that i have two database tables.
1)Ques_Table
2)Table_Of_Weightage
Ques_Table contains Four fields
Rem_Grade1
Rem_Grade2
Rem_Grade3
Rem_Redline
Each of these fields consists of medicine names separated by commas.
Eg.
Rem_Grade1 Rem_Grade2 Rem_Grade3
Arn, ars, bry ang,arn,bapt Ars
Now the Weighatage table consists of two fields
Rem_Abbr Rem_Weight
Ars 0
Aeth 0
Calc 0
As you can see above what i am doing is taking the entire string of medicines one by one in a temp variable like this using a recordset
Dim strMed as String
strMed=adoRecQues!Rem_grade1
strMed=adoRecQues!Rem_grade2
strMed=adoRecQues!Rem_grade3
and so on...
then after extracting the entire string of medicines i am first separating the medicines by using a split function
charMed()=Split(strMed,",")
Then after that using an update statement i am supposed to go to the Table_Of_Weightage and update the Rem_Weight field of each medicine.
Here i am facing a problem with strings.
In the Ques_Table if you notice the starting letter of all medicines is not in capitals,whereas in the Table_Of_Weightage table All the medicines first letter is in capital.
Now this gives me a problem when i am finding a string like this saying
adoRecWeight.Find "Rem_Abbr='" & Trim(charMed(0)) & "'", , adSearchForward, 1
Only those remedies whose cases are matching exactly are being updated means
aeth(in Ques_Table)=Aeth(Table_Of_Weightage) is not getting updated.
Is it possible because of case sensitivity
I can't even go to the main database table and change every first alphabet to capitals because that is a real long process.
Is there any string function which can help me to ignore the case while finding and updating in VB 6.0.
Please let me know...
Thanks
|