Im using ms sql compact 4.0 for db and I just wanna ask How can I exclude word after dot "." to add on my context-hint .
like for Example in my db: http://oi41.tinypic.com/2f06053.jpg
for TypeName "Indicators" , e.g in Indicators.RelativeStrengthIndex, i only want the word "Indicators" to remain and delete word ".RelativeStrengthIndex" or after a dot . same as others .
DataExplorer://ObjDB.sdf/Table/[tb_CsType]
to be appear in my context-hint:
http://oi41.tinypic.com/2j5xczm.jpg
code for my autocomplete:
string conStr = @"Data Source=C:\Users\z\Desktop\Prot\DB\ObjDB.sdf";
SqlCeDataReader sqldrAllData;
SqlCeConnection sqlCon = new SqlCeConnection(conStr);
///1
SqlCeCommand sqlCmd = new SqlCeCommand("Select TypeName, Syntax, Description From tb_CsType", sqlCon);
///2
//SqlCeCommand sqlCmd2 = new SqlCeCommand("Select TypeName, Syntax, Description From tb_CsMember", sqlCon);
sqlCon.Open();
sqldrAllData = sqlCmd.ExecuteReader();
List<string> lstTypeName = new List<string>();
while (sqldrAllData.Read())
{
lstTypeName.Add(sqldrAllData["TypeName"].ToString());
}
foreach (var word in lstTypeName)
yield return (new Autoc(word) { ImageIndex = 3 });
sqlCon.Close();
then question was how can i exlude word after "." in my sql . thanks in advance! more power!