Click here to Skip to main content
15,911,707 members
Home / Discussions / C#
   

C#

 
AnswerRe: Query XML with LINQ Pin
Pete O'Hanlon15-Jun-11 21:31
mvePete O'Hanlon15-Jun-11 21:31 
GeneralRe: Query XML with LINQ Pin
treuveni15-Jun-11 21:37
treuveni15-Jun-11 21:37 
GeneralRe: Query XML with LINQ Pin
Pete O'Hanlon15-Jun-11 21:42
mvePete O'Hanlon15-Jun-11 21:42 
GeneralRe: Query XML with LINQ Pin
treuveni15-Jun-11 21:50
treuveni15-Jun-11 21:50 
GeneralRe: Query XML with LINQ Pin
Pete O'Hanlon15-Jun-11 22:21
mvePete O'Hanlon15-Jun-11 22:21 
QuestionSearching words on visual studio. Pin
Subin Mavunkal15-Jun-11 21:05
Subin Mavunkal15-Jun-11 21:05 
AnswerRe: Searching words on visual studio. Pin
Richard MacCutchan15-Jun-11 21:18
mveRichard MacCutchan15-Jun-11 21:18 
Answer[SOLVED] OleDb Exception Displays Only Table Name Pin
Matt U.15-Jun-11 12:01
Matt U.15-Jun-11 12:01 
So I didn't have time to look into this exception in detail today. If no one can answer due to the vague nature that's okay. I just thought I could ask and possibly receive some general guidance for in the morning.

Anyhow, I am using C# (.NET 4.0, VS2010) to connect to a MS Access 2007 (.accdb) database. The database includes two tables, "Repairs" and "Scrap Codes". The Repairs table includes a field, "Scrap Code", which does a look-up for values using the Scrap Codes table. All works well within Access. I can successfully insert records (through my software) including a value for the Scrap Code field. I have checked the data in Access to verify proper data is inserted; success.

However, when I execute a simple statement within my software:

C#
<br />
---- To retrieve the most common Scrap Code ----<br />
<br />
SELECT TOP 1 [Scrap Code] FROM Repairs<br />
WHERE [Failure Code]=13<br />
GROUP BY [Scrap Code]<br />
ORDER BY Count(*) DESC<br />


where "Failure Code" is another look-up column in the Repairs table, I receive an exception. In the exception dialog that I receive (the JIT box), instead of displaying a description above the Details button, it simply says "Scrap Codes.", the table name. If the possibilities are not too vague could you please provide a few likely culprits?

Now, if the "Scrap Code" field for EVERY record in Repairs is empty, however, I do not run into this issue at all. But if I set a value for "Scrap Code" on any number of records I get this error.

I will have time to look at it in depth tomorrow morning. But I felt the need to ask because it is going to bother me all night. Haha.

Thanks in advance,
Matt U.

[SOLUTION]

There was a typo in the statement. I had an extra letter at the end of the "Scrap Code" field, in the "Repairs" table. Problem solved.

modified on Thursday, June 16, 2011 6:18 PM

AnswerRe: OleDb Exception Displays Only Table Name Pin
AnnieMacD15-Jun-11 13:30
AnnieMacD15-Jun-11 13:30 
GeneralRe: OleDb Exception Displays Only Table Name Pin
Matt U.15-Jun-11 15:47
Matt U.15-Jun-11 15:47 
QuestionIs it possible to query a unix server (SAN) with c sharp? [modified] Pin
turbosupramk315-Jun-11 10:09
turbosupramk315-Jun-11 10:09 
AnswerRe: Is it possible to query a unix server (SAN) with c sharp? Pin
Not Active15-Jun-11 10:16
mentorNot Active15-Jun-11 10:16 
GeneralRe: Is it possible to query a unix server (SAN) with c sharp? Pin
turbosupramk316-Jun-11 2:46
turbosupramk316-Jun-11 2:46 
AnswerRe: Is it possible to query a unix server (SAN) with c sharp? Pin
BobJanova16-Jun-11 2:55
BobJanova16-Jun-11 2:55 
GeneralRe: Is it possible to query a unix server (SAN) with c sharp? Pin
turbosupramk316-Jun-11 3:16
turbosupramk316-Jun-11 3:16 
GeneralRe: Is it possible to query a unix server (SAN) with c sharp? Pin
BobJanova16-Jun-11 8:59
BobJanova16-Jun-11 8:59 
AnswerRe: Is it possible to query a unix server (SAN) with c sharp? Pin
PIEBALDconsult16-Jun-11 16:07
mvePIEBALDconsult16-Jun-11 16:07 
GeneralRe: Is it possible to query a unix server (SAN) with c sharp? Pin
turbosupramk316-Jun-11 16:54
turbosupramk316-Jun-11 16:54 
QuestionConvert string to datetime Pin
treuveni15-Jun-11 9:16
treuveni15-Jun-11 9:16 
AnswerRe: Convert string to datetime PinPopular
Ennis Ray Lynch, Jr.15-Jun-11 9:23
Ennis Ray Lynch, Jr.15-Jun-11 9:23 
GeneralRe: Convert string to datetime [modified] Pin
treuveni15-Jun-11 9:30
treuveni15-Jun-11 9:30 
AnswerRe: Convert string to datetime PinPopular
AspDotNetDev15-Jun-11 9:41
protectorAspDotNetDev15-Jun-11 9:41 
GeneralRe: Convert string to datetime Pin
treuveni15-Jun-11 9:43
treuveni15-Jun-11 9:43 
AnswerRe: Convert string to datetime Pin
GenJerDan15-Jun-11 11:30
GenJerDan15-Jun-11 11:30 
GeneralRe: Convert string to datetime Pin
AspDotNetDev15-Jun-11 11:40
protectorAspDotNetDev15-Jun-11 11:40 

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.