Click here to Skip to main content
16,006,766 members
Home / Discussions / C#
   

C#

 
AnswerRe: windows search Pin
gnadeem16-Dec-06 9:03
gnadeem16-Dec-06 9:03 
QuestionDetect inactive Bat file Pin
AnnnS16-Dec-06 1:38
AnnnS16-Dec-06 1:38 
AnswerRe: Detect inactive Bat file Pin
Luc Pattyn16-Dec-06 4:52
sitebuilderLuc Pattyn16-Dec-06 4:52 
Questiondirectx Pin
pardis16-Dec-06 1:15
pardis16-Dec-06 1:15 
AnswerRe: directx Pin
Luc Pattyn16-Dec-06 4:53
sitebuilderLuc Pattyn16-Dec-06 4:53 
QuestionMonitor elapsed time with the stop watch Pin
steve_rm16-Dec-06 0:52
steve_rm16-Dec-06 0:52 
AnswerRe: Monitor elapsed time with the stop watch Pin
Stefan Troschuetz16-Dec-06 1:14
Stefan Troschuetz16-Dec-06 1:14 
QuestionHow to convert C# escape characters to ACCESS Pin
subramanyeswari16-Dec-06 0:30
subramanyeswari16-Dec-06 0:30 
Hi,

I am framing a sql statement like this select file_id,file_name from XCalibur_files where path Like 'c:\xalibur\*'(
C:\xcalibur\system\programs path exists in the table)

but it is returning zero results.

This is the code..

string AccessConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Xcalibur\System\Programs\XCalibur Database.mdb;Jet OLEDB:Database Password=170464PassFinn;";

//Create an OleDbConnection object,
//and then pass in the ConnectionString to the constructor.
OleDbConnection cn = new OleDbConnection();
cn.ConnectionString = AccessConn;


//Open the connection.
cn.Open();
string str1 = "select file_id,file_name from XCalibur_files where path Like '";
string str2= "c:\\xalibur\\"+ "*'";
//Use a variable to hold the SQL statement.
string selectString =str1+str2 ;

//Notice that this line passes in the SQL statement and the OleDbConnection object
OleDbCommand cmd = new OleDbCommand(selectString,cn);

//Send the CommandText to the connection, and then build an OleDbDataReader.
//Note: The OleDbDataReader is forward-only.
OleDbDataAdapter oledataadapter= new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
oledataadapter.Fill(ds);

MessageBox.Show(ds.Tables[0].Rows.Count.ToString());

Where i am doing wrong?
AnswerRe: How to convert C# escape characters to ACCESS Pin
Stefan Troschuetz16-Dec-06 1:22
Stefan Troschuetz16-Dec-06 1:22 
QuestionGeneric Error Pin
sathishtl00715-Dec-06 21:48
sathishtl00715-Dec-06 21:48 
AnswerRe: Generic Error Pin
Nader Elshehabi15-Dec-06 22:03
Nader Elshehabi15-Dec-06 22:03 
Question[Message Deleted] Pin
haneef115-Dec-06 21:38
haneef115-Dec-06 21:38 
AnswerRe: how to call the buttons dynamically for my own form in c# Pin
Nader Elshehabi15-Dec-06 22:00
Nader Elshehabi15-Dec-06 22:00 
AnswerRe: how to call the buttons dynamically for my own form in c# Pin
Stefan Troschuetz16-Dec-06 1:06
Stefan Troschuetz16-Dec-06 1:06 
QuestionChild Node Text ????????????? Pin
sajid.salim.khan15-Dec-06 20:36
sajid.salim.khan15-Dec-06 20:36 
AnswerRe: Child Node Text ????????????? Pin
Stefan Troschuetz15-Dec-06 21:11
Stefan Troschuetz15-Dec-06 21:11 
QuestionAccess Active Document In Word Template Project Pin
AmitSumit15-Dec-06 20:28
AmitSumit15-Dec-06 20:28 
Questioncode of remember me!!! Pin
Ashish Porwal15-Dec-06 20:12
Ashish Porwal15-Dec-06 20:12 
AnswerRe: code of remember me!!! Pin
toxcct22-Jan-07 10:28
toxcct22-Jan-07 10:28 
QuestionTriggers on sqlserver Pin
vikram92915-Dec-06 19:24
vikram92915-Dec-06 19:24 
QuestionPassing a collection object to a method as a ref parameter... or not? Pin
lvanerstrom15-Dec-06 17:44
lvanerstrom15-Dec-06 17:44 
AnswerRe: Passing a collection object to a method as a ref parameter... or not? Pin
Guffa15-Dec-06 18:27
Guffa15-Dec-06 18:27 
GeneralRe: Passing a collection object to a method as a ref parameter... or not? Pin
lvanerstrom15-Dec-06 18:34
lvanerstrom15-Dec-06 18:34 
QuestionAnybody know how to upload video using ASP.NET? Pin
mujin0315-Dec-06 17:12
mujin0315-Dec-06 17:12 
AnswerRe: Anybody know how to upload video using ASP.NET? Pin
Alper Camel17-Dec-06 9:04
Alper Camel17-Dec-06 9:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.