DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   Selection Problem (http://www.daniweb.com/forums/thread155888.html)

sganandhsg Nov 7th, 2008 7:55 am
Selection Problem
 
Hi Friends

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

I am getting the error while Select the Data...

How to clear this type of errors.... Any one Help Me

QVeen72 Nov 8th, 2008 1:40 am
Re: Selection Problem
 
Hi,

This is normally due to difference in Data-types..
Post your Select statement here..

Regards
Veena

sganandhsg Nov 8th, 2008 4:31 am
Re: Selection Problem
 
Quote:

Originally Posted by QVeen72 (Post 731213)
Hi,

This is normally due to difference in Data-types..
Post your Select statement here..

Regards
Veena


Thanks For Ur Replay

Statement for Selection

rs.Open "Select * from employee where emp_code='" & ListView2.SelectedItem.Text & "'", con, adOpenDynamic, adLockOptimistic

QVeen72 Nov 8th, 2008 10:52 pm
Re: Selection Problem
 
Hi,

I guess, Emp_Code is a Numeric Field in Database..
Dont Wrap it with Single quotes:

rs.Open "Select * from employee where emp_code=" & Val(ListView2.SelectedItem.Text )& "", con, adOpenDynamic, adLockOptimistic

Regards
Veena

sganandhsg Nov 10th, 2008 2:12 am
Re: Selection Problem
 
Quote:

Originally Posted by QVeen72 (Post 731643)
Hi,

I guess, Emp_Code is a Numeric Field in Database..
Dont Wrap it with Single quotes:

rs.Open "Select * from employee where emp_code=" & Val(ListView2.SelectedItem.Text )& "", con, adOpenDynamic, adLockOptimistic

Regards
Veena


No... The emp_code is "Text" like a code as (00A001)

QVeen72 Nov 10th, 2008 2:33 am
Re: Selection Problem
 
Hi,

What all is populated in the List View..?
May be, you want to refer to a SubItem of the list view...(instead of seleted item's text..)
Check how is "rs" declared..?
Connection object is open..


Regards
Veena

sganandhsg Nov 10th, 2008 6:03 am
Re: Selection Problem
 
Quote:

Originally Posted by QVeen72 (Post 732314)
Hi,

What all is populated in the List View..?
May be, you want to refer to a SubItem of the list view...(instead of seleted item's text..)
Check how is "rs" declared..?
Connection object is open..


Regards
Veena



Ok.... But the same package running for Windows XP, win98 system can`t run.... this is find out before 2 hours back...


Thanks & Regards
Anandh

sganandhsg Nov 17th, 2008 8:46 am
Re: Selection Problem
 
Quote:

Originally Posted by QVeen72 (Post 732314)
Hi,

What all is populated in the List View..?
May be, you want to refer to a SubItem of the list view...(instead of seleted item's text..)
Check how is "rs" declared..?
Connection object is open..


Regards
Veena



Hi... Veena


U have any idea abt this Selection process...


All times are GMT -4. The time now is 4:06 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC