Click here to Skip to main content
15,890,438 members

Ilka Guigova - Professional Profile



Summary

    Blog RSS
3,733
Author
60
Authority
328
Debator
193
Editor
5
Enquirer
346
Organiser
888
Participant

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralT-SQL Cursor and XML Basic Example Pin
Ilka Guigova3-Apr-10 13:13
Ilka Guigova3-Apr-10 13:13 
GeneralT-SQL Auto Increment Variable Pin
Ilka Guigova2-Apr-10 20:04
Ilka Guigova2-Apr-10 20:04 
GeneralApplying XSL Transformations Pin
Ilka Guigova29-Mar-10 11:05
Ilka Guigova29-Mar-10 11:05 
GeneralXML DOM Load Functions Pin
Ilka Guigova10-Aug-12 13:46
Ilka Guigova10-Aug-12 13:46 
GeneralWorking with durations in MSSQL server Pin
Ilka Guigova31-Jan-10 13:11
Ilka Guigova31-Jan-10 13:11 
GeneralRe: Working with durations in MSSQL server Pin
Grunge Boy31-Jan-10 23:29
Grunge Boy31-Jan-10 23:29 
GeneralRe: Working with durations in MSSQL server Pin
Ilka Guigova1-Feb-10 7:17
Ilka Guigova1-Feb-10 7:17 
GeneralThe hidden __arglist keyword Pin
Ilka Guigova9-Aug-09 14:38
Ilka Guigova9-Aug-09 14:38 
(Originally posted: 2007-09-26)

The __arglist keyword can be very useful. It returns an argument list handle for the current method. By calling __arglist a pointer to the argument list is pushed on the stack.

Application:
In the new OLM Inventory application, the backend interactions are abstracted to a few methods:

. public static void BuildQuery(out string sql_cmd, out OleDbParameter[] sql_params, int mode, string tbl, string input, __arglist)
. public static int ExecNonQuery(string sql_cmd, OleDbParameter[] sql_params)
. public static List<Object> ExecQuery(Type rcrd_type, string sql_cmd, OleDbParameter[] sql_params)

The BuildQuery method has to be flexible enough to work with unknown number of arguments representing the query parameters. Thus we use the __arglist keyword as shown in this excerpt:
public static void BuildQuery(out string sql_cmd, out OleDbParameter[] sql_params, int mode, string tbl, string input, __arglist)
{         
    sql_params = null;
    sql_cmd = String.Empty;
    try
    {
        string[] rcrd_params = input.Split(new Char[] { ',' });

        ArgIterator param_iter = new ArgIterator(__arglist);
        int param_count = param_iter.GetRemainingCount();

        if (param_count != rcrd_params.Length)
        {
            ErrorLogDataSource.LogError(String.Format(
                "Failed to build query with {1}/{2} parameters", 
                param_count, rcrd_params.Length));
            return; 
        }
     
        sql_params = new OleDbParameter[param_count];
        sql_cmd = String.Empty;
        for (int i = 0; i < param_count; i++)
        {
            Object param = TypedReference.ToObject(param_iter.GetNextArg());
            sql_params[i] = new OleDbParameter(rcrd_params[i], param);

            // Logic to append to sql_cmd goes here...

        }
    } catch (Exception ex)
    {
        sql_cmd = String.Empty;
        sql_params = null;

        ErrorLogDataSource.LogException(new Exception(
            String.Format("Failed to build query for {1} with {2} in {3} mode - {0}", 
            ex.Message, tbl, input, mode), 
            ex));
    }
}

Here is a sample call to BuildQuery:
public static List<Object> GetStatusTypes(int ID, string Name, string Description, bool Reload, int UserID)
{            
    if ((!isCached) || (Reload))
    {
        DataSourceAdapter.BuildQuery(out sql_cmd, out sql_params, 3, tbl_name, "Name,Description,ID,ID", __arglist("%", "%", -1, -1));
        cache = DataSourceAdapter.ExecQuery(typeof(StatusType), sql_cmd, sql_params);
        isCached = true;
        listFilter = null;
    }
    // ....
}


Reference:
. Hidden Keywords[^]
. Variable argument list
GeneralServices Pin
Ilka Guigova9-Aug-09 14:27
Ilka Guigova9-Aug-09 14:27 
GeneralTerminal Services Pin
Ilka Guigova9-Aug-09 14:24
Ilka Guigova9-Aug-09 14:24 
GeneralSerial com ports Pin
Ilka Guigova9-Aug-09 14:18
Ilka Guigova9-Aug-09 14:18 
GeneralScrollable GridView Pin
Ilka Guigova9-Aug-09 13:58
Ilka Guigova9-Aug-09 13:58 
GeneralHow to instantiate a class from a class name Pin
Ilka Guigova9-Aug-09 11:08
Ilka Guigova9-Aug-09 11:08 
GeneralDebugging COM+ Components in Visual Studio Pin
Ilka Guigova9-Aug-09 10:41
Ilka Guigova9-Aug-09 10:41 
GeneralRetrieving the COM+ class factory for component failed Pin
Ilka Guigova29-Jul-10 12:10
Ilka Guigova29-Jul-10 12:10 
GeneralDebugging COM+ Components in Delphi Pin
Ilka Guigova9-Aug-09 9:27
Ilka Guigova9-Aug-09 9:27 
GeneralCOM Surrogate error Pin
Ilka Guigova9-Aug-09 9:07
Ilka Guigova9-Aug-09 9:07 
GeneralC++ conversion - text to currency Pin
Ilka Guigova9-Aug-09 8:54
Ilka Guigova9-Aug-09 8:54 
GeneralApplication.ProcessMessages() without the Forms unit Pin
Ilka Guigova9-Aug-09 8:38
Ilka Guigova9-Aug-09 8:38 

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.