CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Krzemo

Page 1 of 60 1 2 3 4

Search: Search took 0.43 seconds.

  1. Re: ComboBox.Items.Clear() not working correctly with .SelectedIndex = -1

    Also IMHO this code should not work!

    for(int i=0;i<cmboboName.Items.Count;i++)
    {
    comboboxName.Items.RemoveAt(i); //VERY BAD IDEA!
    i--;
    }

    The loop is incrementing index" while "RemoveAt"...
  2. Replies
    7
    Views
    1,644

    Re: Database Restore Error TSQL

    Could U send whole SP?

    U have too many " ' " in output in ''TNGoedit_Data''
  3. Replies
    7
    Views
    1,644

    Re: Database Restore Error TSQL

    As I said before uU shold'nt use CHAR datat type. use VARCHAR (and use RTRIM() function too).
    See:
    'oBookingUFS '
    '................ ^'

    And is it a possibility that 'TNGoedit_Data' is really...
  4. Replies
    7
    Views
    1,644

    Re: Database Restore Error TSQL

    more comments:

    1) Do not use "char" data type - use varchar instead. "char" can add extra spaces on the end in some circumstances.

    2) The error will now be there :

    for the same reason -...
  5. Replies
    7
    Views
    1,644

    Re: Database Restore Error TSQL

    replace this:

    into this:

    declare @path varchar(64),@filepath varchar(255)

    and this:


    into this:
  6. Replies
    4
    Views
    1,731

    Re: 2 basic transaction issues

    Yes - because "single insert " can trigger more actions ...
    And Yes - because it is good programming practise.
  7. Replies
    4
    Views
    1,731

    Re: 2 basic transaction issues

    yes!
  8. Re: What is the meaning of the return value and error message?

    No! It is a value which sometimes (on errors) is returned by MsSQL server (internally). If U don't write "RETURN XXX" (where XXX is a place for any integer) then on success SP will return "0". If U...
  9. Re: What is the meaning of the return value and error message?

    MsSQL Server...
    ;-)

    U should not depend on exact error value returned from stored procedure, because user CAN (but shouldnt) write code that return -4 as well. Better use exception handling...
  10. Replies
    11
    Views
    2,065

    Re: find store procedure

    yes
    ;)
  11. Replies
    11
    Views
    2,065

    Re: find store procedure

    because it (user/schema id) is in different column.
    ;-)

    sp_helptext splits up that formal name and do exactly the same select
  12. Replies
    11
    Views
    2,065

    Re: find store procedure

    should be:


    SELECT c.text
    FROM sysobjects o
    INNER JOIN syscomments c ON c.id=o.id
    WHERE o.name='prc_AddABC'
    ORDER BY colid
  13. Re: What is the meaning of the return value and error message?

    http://doc.ddart.net/mssql/sql70/ea-ez_2.htm
  14. Re: What is the meaning of the return value and error message?

    http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@ebt-link;pt=42965?target=%25N%15_43870_START_RESTART_N%25

    It is a SYBASE, but ... U know... SYBASE=MsSQL.... almost.
    ;-)
  15. Replies
    15
    Views
    3,081

    Re: Duplicate records in the database

    Database is a "shared resource", not an isolated island. If one session locks up an object, than other session that will be trying to get that resource will be blocked until it will be released (for...
  16. Replies
    11
    Views
    2,065

    Re: find store procedure

    It is in Your database... I don't know its name ...
    ;-)

    Try this:

    SELECT c.text
    FROM sysobjects o
    INNER JOIN syscomments c ON c.id=o.id
    WHERE o.name='YoursProcedureName'
    ORDER BY colid
  17. Replies
    9
    Views
    1,549

    Re: Creating A Query In A Stored Procedure

    Some concepts...

    First IsNull() OR "(Sales.Quarter = @QuarterXX OR @QuarterXX IS NULL)" (assumption is made that variables are set to null when "not set", not to "0" as in first, original ...
  18. Replies
    4
    Views
    1,143

    Re: smarter ways to make a column value unique

    And that is a correct solution.
    ;-)
    Create unique constraint to solve it (as mentioned above). But maybe also keep your checks, so U can resolve that gracefully (unique index will speed up that...
  19. Replies
    11
    Views
    2,065

    Re: find store procedure

    In database inside the "syscomments" table ....
    ;-)
  20. Re: Executing Multiple procedures Parallel( not in sequence) in dotnet

    Create 3 threads. In each thread:
    1) Open connection
    2) Execute SP
    3) Close Connection

    If U have 3 processors , there will be a slight chance that it will execute in parralel ..
    ;-)

    Best...
  21. Replies
    2
    Views
    1,102

    Re: try catch in T-SQL

    http://www.google.com/search?hl=pl&q=try+catch+TSQL&lr=
  22. Replies
    15
    Views
    3,081

    Re: Duplicate records in the database

    Because there is a possibility that database will hold locks on objects that U modify. Message Box will stop normal program flow waiting for user input ... but user goes on holiday ...
    ;-)
    Other...
  23. Replies
    3
    Views
    1,570

    Re: how about comma on integers?

    yes.

    :D
  24. Replies
    3
    Views
    1,343

    Re: Creating MS Access Application

    In menu: tools/startup - set up a startup form (which U created before)

    Than add "global" code

    Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant)...
  25. Replies
    2
    Views
    1,225

    Re: Sproc: Returning Data & Errors

    for example:

    IF EXISTS ( SELECT EmployeeID FROM Employee WHERE EmployeeID = @p_EmployeeID )

    /* RETURN AN EXCEPTION */
    RAISERROR('Employee already in database',16,1)
    Return -1;
Results 1 to 25 of 1488
Page 1 of 60 1 2 3 4





Click Here to Expand Forum to Full Width

Featured