Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Cry
Starting Member
24 Posts |
Posted - 2009-01-29 : 02:25:21
|
Hi,i have a problem with a datareader object. Its an ADO.Net connection to a sybase sql anywhere engine.I put in a select statement that sometimes selects values and sometimes not (only in one filed). Does anybody know if there isany chaching in the Source???Thanks |
|
AvanthaSiriwardana
Yak Posting Veteran
78 Posts |
Posted - 2009-01-29 : 03:11:10
|
can u give me the SELECT Statement?Avantha Siriwardana |
 |
|
Cry
Starting Member
24 Posts |
Posted - 2009-01-29 : 03:20:17
|
SELECT vtb_name as name, ag_vtbid as idFROM nsc_ag LEFT JOIN nsc_vtb ON nsc_ag.ag_vtbid = nsc_vtb.vtb_idWHERE ag_agnr BETWEEN '1000000' AND '1999999'Sometimes the select statement retrieves values for "name" and sometimes not.The joined table contains all possible values of vtb_id because ag_vtbid is a foreign key. |
 |
|
AvanthaSiriwardana
Yak Posting Veteran
78 Posts |
Posted - 2009-01-29 : 03:42:29
|
In your where clause specify the table name and then give the field name.WHERE tablename.ag_agnr BETWEEN '1000000' AND '1999999'Avantha Siriwardana |
 |
|
Cry
Starting Member
24 Posts |
Posted - 2009-01-29 : 04:29:45
|
thanks,i checked it, but the result is the same. Sometimes there are values sometimes not. Seems to be a caching problem? |
 |
|
AvanthaSiriwardana
Yak Posting Veteran
78 Posts |
Posted - 2009-01-29 : 04:49:32
|
why are you having a LEFT JOIN instead of INNER JOIN???Avantha Siriwardana |
 |
|
|
|
|