• Member Avatar
    adam_k

    Replied To a Post in Windows installation from Mars

    If you have the system backup(s) and the data in a partition of the system HDD, effectively you are only securing yourself from user error. If the drive goes bad …
  • Member Avatar
    adam_k

    Replied To a Post in simple question regarding datagrid

    Usually unless we act on something, nothing happens. I'm guessing that you have already binded the datagridviewer to your dataset, from the VB GUI. Instead, just place an empty datagridviewer …
  • Member Avatar
    adam_k

    Replied To a Post in Syntax Error in From Clause. Selecting between two Dates

    I believe you are closing one parenthesis from the "FROM" clause in your where. Try this : sqlQuery = sqlQuery & " INNER JOIN Barangay ON Borrowers.BRGYNO = Barangay.BRGYNO)) " …
  • Member Avatar
    adam_k

    Replied To a Post in VB.net Error: cmd.ExecuteNonQuery

    1st of all this is a very old thread. You should have opened a new one. 2nd I see you closing the Conn but never open it. Try to open …
  • Member Avatar
    adam_k

    Replied To a Post in i want to insert invoice values into databade invoice amount limit and spli

    Because you are not giving a lot of information, I cannot provide a specific solution. Try to use a case when inserting or a trigger or use a stored procedure …
  • Member Avatar
    adam_k

    Replied To a Post in update row in data grid view

    Generally the update will not update 3 tables at once and your syntax is wrong. I assume that you are trying this because you don't know which of the 3 …
  • Member Avatar
    adam_k

    Replied To a Post in Stored procedure Returning unexpected value while implementing AND Oprator

    I believe that you problem doesn't lie with the if, but with how you give values to @Ucount and @Ecount: select @Ucount = count(Username), @Ecount= Count(Email) from userdata where Username=@nameUsername …
  • Member Avatar
    adam_k

    Replied To a Post in Periodic activity report of (Inventory) Products at each location

    This is a bad design / idea / report and the solution won't be really nice. It's been a while since I've done anything with Access, but since nobody else …
  • Member Avatar
    adam_k

    Replied To a Post in Aggregation MS SQL

    I'm not sure why you group by "Avg Completion Duration". That means that you want a separate record for each completion duration. If you want the average to include results …
  • Member Avatar
    adam_k

    Replied To a Post in Pivot query

    This guy talks about dynamic columns in pivots: https://www.simple-talk.com/blogs/2007/09/14/pivots-with-dynamic-columns-in-sql-server-2005/
  • Member Avatar
    adam_k

    Replied To a Post in Pattern matching in sql

    I'm not sure what you are trying to do, but try something like this: Declare @msg as varchar(20) SELECT @msg = '2014/9-1' declare @slash as int declare @minus as int …
  • Member Avatar
    adam_k

    Replied To a Post in Pivot query

    Assuming that you only need Mytime1 to Mytime10 (10 pivoted columns) only: http://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx If it's a dynamic pivot, one where Mytime can be anything from 1 column up to whatever, …
  • Member Avatar
    adam_k

    Replied To a Post in How to prevent duplicate entry to database

    In the Else part of the if..end if you are only setting the com, you are not executing it. Try executing the command you've just set.

The End.