Click here to Skip to main content
15,912,400 members
Home / Discussions / C#
   

C#

 
AnswerRe: Display Word Documents in C# Pin
Giorgi Dalakishvili1-Dec-08 0:00
mentorGiorgi Dalakishvili1-Dec-08 0:00 
Question[Message Deleted] Pin
himuskanhere30-Nov-08 20:26
himuskanhere30-Nov-08 20:26 
AnswerRe: Reading Excel file Pin
dan!sh 30-Nov-08 21:09
professional dan!sh 30-Nov-08 21:09 
Questionhelp - Get text from MHT file in C# Pin
ShiraRK30-Nov-08 19:57
ShiraRK30-Nov-08 19:57 
AnswerRe: help - Get text from MHT file in C# Pin
leppie30-Nov-08 20:03
leppie30-Nov-08 20:03 
GeneralRe: help - Get text from MHT file in C# Pin
ShiraRK30-Nov-08 21:03
ShiraRK30-Nov-08 21:03 
AnswerRe: help - Get text from MHT file in C# Pin
Ashfield30-Nov-08 21:21
Ashfield30-Nov-08 21:21 
QuestionC# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
thuyphuongid30-Nov-08 16:25
thuyphuongid30-Nov-08 16:25 
I coded folowing:
public void PWriteToEventLog(Exception ex)
{
EventLog lLog = new EventLog();
lLog.Source = "Data Access Error... ";
lLog.WriteEntry(ex.Message.ToString());
}

public DataTable PGetDataTable(string vConn, string vStrSQL, string vTableName)
{
//variable to return
DataTable lDataTable;

//variable to process
OleDbConnection lConn = new OleDbConnection(vConn);
OleDbCommand lComm = new OleDbCommand(vStrSQL, lConn);
OleDbDataAdapter lAdapter = new OleDbDataAdapter();

try
{
lConn.Open();
lAdapter.SelectCommand = lComm;
}
catch (Exception ex)
{
this.PWriteToEventLog(ex);
throw new Exception("Error from [PGetDataTable]\n" + ex.ToString());
}
try
{
lDataTable = new DataTable(vTableName);
lAdapter.Fill(lDataTable);
lConn.Close();
}
catch (Exception ex)
{
this.PWriteToEventLog(ex);
throw new Exception("Error ... \n" + ex.ToString());
}
return lDataTable;
}
When I run. It notice bug: Unhandle exception has your occured in your application.
Error... system.data.oledbexception: sysntax error in from Clause.
AnswerRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Christian Graus30-Nov-08 16:34
protectorChristian Graus30-Nov-08 16:34 
AnswerRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Christian Graus30-Nov-08 16:50
protectorChristian Graus30-Nov-08 16:50 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
thuyphuongid30-Nov-08 16:56
thuyphuongid30-Nov-08 16:56 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Christian Graus30-Nov-08 16:58
protectorChristian Graus30-Nov-08 16:58 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
dan!sh 30-Nov-08 17:02
professional dan!sh 30-Nov-08 17:02 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Christian Graus30-Nov-08 17:09
protectorChristian Graus30-Nov-08 17:09 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Paul Conrad30-Nov-08 17:27
professionalPaul Conrad30-Nov-08 17:27 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
thuyphuongid30-Nov-08 17:12
thuyphuongid30-Nov-08 17:12 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
thuyphuongid30-Nov-08 17:17
thuyphuongid30-Nov-08 17:17 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Christian Graus30-Nov-08 17:18
protectorChristian Graus30-Nov-08 17:18 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Paul Conrad30-Nov-08 17:28
professionalPaul Conrad30-Nov-08 17:28 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
dan!sh 30-Nov-08 17:45
professional dan!sh 30-Nov-08 17:45 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Christian Graus30-Nov-08 17:17
protectorChristian Graus30-Nov-08 17:17 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
thuyphuongid30-Nov-08 17:28
thuyphuongid30-Nov-08 17:28 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Paul Conrad30-Nov-08 17:32
professionalPaul Conrad30-Nov-08 17:32 
GeneralRe: C# - Get DataTable from Access. Please, help me. I can not know this bugs. Pin
Paul Conrad30-Nov-08 17:29
professionalPaul Conrad30-Nov-08 17:29 
QuestionPlease rate this Visual C# Wallapaper Pin
Bottomless Wisdom30-Nov-08 12:35
Bottomless Wisdom30-Nov-08 12:35 

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.