Click here to Skip to main content
15,887,474 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Questioncheck data prior to insert Pin
Member 1185289422-Jul-15 8:04
Member 1185289422-Jul-15 8:04 
AnswerRe: check data prior to insert Pin
Michael_Davies22-Jul-15 8:41
Michael_Davies22-Jul-15 8:41 
AnswerRe: check data prior to insert Pin
Daniel Pfeffer22-Jul-15 9:23
professionalDaniel Pfeffer22-Jul-15 9:23 
QuestionJoining Multiple Tables SQL Query Problem Pin
ratchoy01021-Jul-15 22:16
ratchoy01021-Jul-15 22:16 
AnswerRe: Joining Multiple Tables SQL Query Problem Pin
Richard Deeming22-Jul-15 1:04
mveRichard Deeming22-Jul-15 1:04 
GeneralRe: Joining Multiple Tables SQL Query Problem Pin
ratchoy01022-Jul-15 4:07
ratchoy01022-Jul-15 4:07 
GeneralRe: Joining Multiple Tables SQL Query Problem Pin
Dave Kreskowiak22-Jul-15 4:55
mveDave Kreskowiak22-Jul-15 4:55 
GeneralRe: Joining Multiple Tables SQL Query Problem Pin
Richard Deeming22-Jul-15 7:38
mveRichard Deeming22-Jul-15 7:38 
ratchoy010 wrote:
By the way, i'm using vb.net 2008 with MS Access as my database back-end.

OK, that's the sort of useful information you should include in your question. Smile | :)

Access doesn't support common table expressions. You might be able to use a nested query, although I haven't tried it:
SQL
SELECT
    IsNull(P.Item, S.Item_Description) As Item,
    IsNull(P.Quantity_Received, 0) As Purchases,
    IsNull(S.Quantity, 0) As Sold
FROM
    (
        SELECT
            Item,
            Sum(Quantity_Received) As Quantity_Received
        FROM
            Purchase
        WHERE
            PO_Date Between ? And ?
        GROUP BY
            Item
    ) As P
    FULL OUTER JOIN 
    (
        SELECT
            Item_Description,
            Sum(Quantity) As Quantity
        FROM
            Sales
        WHERE
            Sales_Date Between ? And ?
        GROUP BY
            Item_Description
    ) As S
    ON S.Item_Description = P.Item


You'll also find the the OleDbCommand doesn't support named parameters; you have to use ? as the parameter placeholder, and add the parameters to the command in the same order as they appear in the query:
C#
using (var connection = new OleDbConnection("..."))
using (var command = new OleDbCommand("...", connection))
{
    // The names don't matter here, only the order:
    command.Parameters.AddWithValue("p0", dtfrom.Value);
    command.Parameters.AddWithValue("p1", dtto.Value);
    
    // You have to repeat the parameters, since they appear twice in the query:
    command.Parameters.AddWithValue("p2", dtfrom.Value);
    command.Parameters.AddWithValue("p3", dtto.Value);
    ...
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


QuestionIs it possible to add Custom Suggestions to google.maps.places.Autocomplete Pin
sr15915-Jul-15 23:59
sr15915-Jul-15 23:59 
AnswerRe: Is it possible to add Custom Suggestions to google.maps.places.Autocomplete Pin
Dave Kreskowiak17-Jul-15 3:58
mveDave Kreskowiak17-Jul-15 3:58 
QuestionAsp.net front and back end confusion! Pin
George Tourtsinakis10-Jul-15 5:06
George Tourtsinakis10-Jul-15 5:06 
AnswerRe: Asp.net front and back end confusion! Pin
Pete O'Hanlon10-Jul-15 5:28
mvePete O'Hanlon10-Jul-15 5:28 
GeneralRe: Asp.net front and back end confusion! Pin
George Tourtsinakis12-Jul-15 3:59
George Tourtsinakis12-Jul-15 3:59 
GeneralRe: Asp.net front and back end confusion! Pin
Dave Kreskowiak12-Jul-15 4:29
mveDave Kreskowiak12-Jul-15 4:29 
GeneralRe: Asp.net front and back end confusion! Pin
George Tourtsinakis18-Jul-15 23:16
George Tourtsinakis18-Jul-15 23:16 
QuestionClone child gridview in nested gridview Pin
Member 118269799-Jul-15 21:20
Member 118269799-Jul-15 21:20 
AnswerRe: Clone child gridview in nested gridview Pin
User 418025428-Jul-15 8:54
User 418025428-Jul-15 8:54 
QuestionHow to get Memory usage size of each services running on Application Server using C#.net Pin
ven7538-Jul-15 20:18
ven7538-Jul-15 20:18 
AnswerRe: How to get Memory usage size of each services running on Application Server Pin
Michael_Davies8-Jul-15 20:24
Michael_Davies8-Jul-15 20:24 
GeneralRe: How to get Memory usage size of each services running on Application Server using C#.net Pin
ven7538-Jul-15 20:28
ven7538-Jul-15 20:28 
GeneralRe: How to get Memory usage size of each services running on Application Server using C#.net Pin
Michael_Davies8-Jul-15 21:08
Michael_Davies8-Jul-15 21:08 
GeneralRe: How to get Memory usage size of each services running on Application Server using C#.net Pin
ven7538-Jul-15 23:16
ven7538-Jul-15 23:16 
GeneralRe: How to get Memory usage size of each services running on Application Server using C#.net Pin
Michael_Davies8-Jul-15 23:43
Michael_Davies8-Jul-15 23:43 
GeneralRe: How to get Memory usage size of each services running on Application Server using C#.net Pin
ven7539-Jul-15 0:56
ven7539-Jul-15 0:56 
GeneralRe: How to get Memory usage size of each services running on Application Server using C#.net Pin
ven7539-Jul-15 1:43
ven7539-Jul-15 1:43 

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.