Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
F

Fayu

@Fayu
About
Posts
151
Topics
45
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • \r\n ignored when executing queryies using ADO
    F Fayu

    My first thought was unix as well. The user swears that it's a windows. Is there a query I can run to figure out what is the server is running on?

    Database database help c++ oracle sysadmin

  • \r\n ignored when executing queryies using ADO
    F Fayu

    Its a Windows 2008 machine.

    Database database help c++ oracle sysadmin

  • \r\n ignored when executing queryies using ADO
    F Fayu

    Hi, I am having an issue executing a create procedure query to Oracle 10g. I am building the query in C++ (Exhibit A) and executing it using ADO (Exhibit B). In most systems, which I do not manage, the query is build and executed on oracle correctly (see Exhibit D). However, I have this one Oracle server that is, for some odd reason, ignoring the new line feeds (\r\n) (see Exhibit C). Is there a setting in Oracle that I am over looking? Your help is appreciated. Thanks in advance. Let me know if you need any more info. EXHIBIT A - Code in C++ to build query:

    CString cstrTmp;cstrTmp =
    "CREATE OR REPLACE PROCEDURE \"DoSomething\" \r\n"
    "(\r\n" " pTxt nvarchar2\r\n" ")\r\n"
    "as\r\n"
    "\r\n"
    "vXml XmlType;\r\n"
    "vTempCounter int;\r\n"
    "\r\n" "begin\r\n"
    " --my comment\r\n"
    " dbms_output.put_line('test');
    "end;\r\n"

    EXHIBIT B - This is the code that executes the query above to the database (in c++):

    //where cBuffer is the query above
    if(pCommand == NULL)
    {
    pCommand.CreateInstance(__uuidof(Command));
    pCommand->CommandType = adCmdText;
    }
    pCommand->CommandText= _bstr_t(*cBuffer);
    pCommand->CommandTimeout = m_pConn->CommandTimeout;
    pCommand->ActiveConnection = m_pConn;
    pCommand->Execute(NULL, NULL, adExecuteNoRecords);
    pCommand = NULL;

    EXHIBIT C - This is how the query is seen in the procedure - In one single line. \r\n is ignored:

    CREATE OR REPLACE PROCEDURE "DoSomething"(pTxt nvarchar2)asvXml XmlType;vTempCounter int;BEGIN --myComment dbms_utput.put_line('test');END;

    EXHIBIT D - It should show up like this after it is created on the database:

    CREATE OR REPLACE PROCEDURE "DoSomething"
    (pTxt nvarchar2)
    asv
    Xml XmlType;
    vTempCounter int;
    BEGIN
    -- my comment
    dbms_output.put_line('test');
    END;

    Database database help c++ oracle sysadmin

  • cannot do add to cart function
    F Fayu

    5 for you because of your etiquette and good manners!!!

    ASP.NET help asp-net debugging

  • The function gets Fired Twice why ?
    F Fayu

    Just a thought, are you calling this method on Page_Load?

    ASP.NET design question

  • Re redirection to Login.aspx
    F Fayu

    If the markup you posted is on the page where you are clicking around (not the login page) then it seems like you are redirecting the user to the login.aspx page when the form is submitted. Unless the login page checks to see if the user is authenticated and then redirects to the appropriate page, this would explain why it is redirected to the login page. Question: 1) What do you mean by 'tab'. Are you talking about an IE7 tab, a tab control or links that look like tabs? 2) Any reason you set the action attribute on the form? I think the last time I did that was during the classic asp time.

    ASP.NET debugging csharp javascript database help

  • Globally use of Hash Table in Web Application
    F Fayu

    Investigate GLOBAL.ASAX

    ASP.NET data-structures cryptography

  • C# threading question: Invoke() fails with ObjectDisposedException
    F Fayu

    is the value null?

    C# question csharp debugging help announcement

  • C# threading question: Invoke() fails with ObjectDisposedException
    F Fayu

    Your code should read:

    if (this.InvokeRequired)
    {
       ProgressValueDelegate pvd = new ProgressValueDelegate(SetProgressValue);                          
       this.Invoke(pvd, new object\[\] { value });
       return;
    }
    else
    {
       m\_progressBar.Value = value;
    }
    

    I usually check to see if ISyncronizeInvoke is implemented and work on interface. This is how it would look:

    ISyncronizeInvoke sync = (ISyncronizeInvoke)this;
    if (sync != null)
    {
        if(sync.InvokeRequired)
        {
            ProgressValueDelegate pvd = new ProgressValueDelegate(SetProgressValue);                          
            object\[\] args = { value };
            sync.Invoke(pvd, args);
            return;
        }
        else
        {
            m\_progressBar.Value = value; 
        }
    }
    
    C# question csharp debugging help announcement

  • Thread.Join() and GUI
    F Fayu

    Just because you call a join does not mean that the function that you are running is terminated. When calling join, the caller (in your case the background process) will block indefinetly as long as the thread has not terminated. If the thread is completed, then the join method will end immediately. To fix your problem, ensure that you are exiting the function that is running in the background thread when the user 'cancels' the request.

    C# question mobile design help tutorial

  • Databinding ASP.NET gridview using multithreading
    F Fayu

    Multithreading may not be a solution here. The queries you are running dont seem very efficient. If these queries are taking one minute to run, than you might have to rethink what you are attempting. Here are a few suggestions: 1) Make sure your tables/views are indexed. If they are make sure your indexes are not fragmented. That will cause your queries to take longer than they should. 2) If you are using SELECT * and dont need all those columns, updatethe query to selec the columns you actually need. 3) Use stored procedures instead of inline queries. Stored procedures have an advantage because their statistics/execution plans are stored for future executions. This may increase the time it takes to run your query. 4) Make sure you dont have crazy joins. These are usually a major problem with complex, slow running queries. 5) If you are returing many many many rows, you may want to consider server side paging. Hope this helps.

    ASP.NET question csharp asp-net

  • Embedded Resources in base class [modified]
    F Fayu

    I have two projects: 1) MyProject1 2) MyProject2 Directory Structure MyProject1 -Images ---BaseControl ------img1.gif ------img2.gif ------img3.gif -Css ---BaseControl ------StyleSheet.css -Controls ---BaseControl.cs - derived from CompositeControl ---Derived1.cs - derived from BaseControl ---Derived11.cs - derived from BaseControl ---Derived12.cs - derived from BaseControl MyProject2 -Controls ---Derived4.cs - derived from BaseControl Assembly.cs for MyProject1 NOTE: Image is set as an embedded resource [assembly: WebResource("MyProjects1.Images.BaseControl.gif", "img/gif")] To get the link to the WebResource, I do the following: myImgControl.ImageUrl = this.GetImageUrl("MyProject1.Images.BaseControl.gif"); This works fine with Derived1, Derived11 and Derived12 controls since the embedded resource is available to their parent. However, Derived4 control cannot find the images because the 'MyProject1.Images.BaseControl.gif' is not part of its embedded resource. Let me know if you need anymore info. Thanks.

    modified on Wednesday, August 11, 2010 6:43 PM

    ASP.NET css hardware learning

  • Embedded CSS not working during designtime [modified]
    F Fayu

    Figured it out. I changd the RegisterStyleSheet to return a string:

        string RegisterStyleSheet()
        {
            string includeTemplate =
                "";
            string includeLocation =
                  Page.ClientScript.GetWebResourceUrl(this.GetType(), "Fyuzon.Membership.Web.Css.BaseGridStyleSheet.css");
            return String.Format(includeTemplate, includeLocation);
        }
    

    and override the RenderControl with the following:

        public override void RenderControl(HtmlTextWriter writer)
        {
            writer.Write(this.RegisterStyleSheet());
            base.RenderControl(writer);
        }
    

    Works like a charm... If there is a better way of doing this, please do let me know.

    ASP.NET design css wpf hardware help

  • Embedded CSS not working during designtime [modified]
    F Fayu

    I have an embedded css resource which contains styling info for a table. When I run my app, the table is shown with the styles specified. During design time, these styles are not applied to my table. More info below. I think my problem may be that the OnPreRender may not be run during design time. What are my options? Thanks in advance. assembly.cs: [assembly: WebResource("MyNamespace.StyleSheet.css", "text/css", PerformSubstitution=true)] MyControl.cs:

        void RegisterStyleSheet()
        {
            string includeTemplate =
                "";
            string includeLocation =
                  Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyNamespace.StyleSheet.css");
            LiteralControl include =
                  new LiteralControl(String.Format(includeTemplate, includeLocation));
            ((System.Web.UI.HtmlControls.HtmlHead)Page.Header).Controls.Add(include);
        }
    
        protected override void OnPreRender(EventArgs e)
        {
            RegisterStyleSheet();
    
    
            base.OnPreRender(e);
        }
    

    modified on Friday, July 9, 2010 1:54 PM

    ASP.NET design css wpf hardware help

  • Adding control and serverside script to page dynamically
    F Fayu

    I understand the server side scripts are executed in the server but I figured that there has to be a point during the life cyle where the markup, including the scripts, are parsed and compiled into dlls. This is where I wanted to inject my text. Seems like I may have to find another solution. Thanks for your input.

    ASP.NET sysadmin tools question

  • Adding control and serverside script to page dynamically
    F Fayu

    I am trying to create a 'Content Management System' type of app. I want to add 'pages' dynamically with server controls markup and attach them to events. So bascially, I want to be able to write an entire asp.net page w/ server side scripts in text and execute it at run-time. What I have been able to accomplish so far is creating the control. However, hooking on to the events is whats causing me problems.

    ASP.NET sysadmin tools question

  • Adding control and serverside script to page dynamically
    F Fayu

    I want to be able to be able to add scripts AFTER my application has already been compiled. Like VSA. In this example I have added it to my codebehind but the real-life example will not have the string in the code behind.

    modified on Sunday, June 20, 2010 10:49 AM

    ASP.NET sysadmin tools question

  • Adding control and serverside script to page dynamically
    F Fayu

    Thanks for your response. Thats not exactly what I am trying to do. I want to be able to add dynamic code after my app has been build... just lke VSA.

    ASP.NET sysadmin tools question

  • Adding control and serverside script to page dynamically
    F Fayu

    I have some text (shown below) which I want to add to the page. This text contains server side script which I would also like to add dynamically. Is this a possibility? So far I have attempted to add the text as controls using Page.ParseControl. This successfully adds the controls (textbox and button) to the page but the button events are not working (postback so far looks good). After researching this further, several possibilities came into play. The first was CodeCompiler and the second was Dynamic Language Extensibility Model (DLEM). I have not read too much into DLEM but the article I read talked mostly about IronPython so this approach may not work in my scenario. In any case, both of these seem like overkill. I figured before I continue with my research, I would ask for suggestions from the community. Here are my questions: 1) Are the above possibilities a reasonable approach? 2) Is there something else I should be looking into? 3) Is it even possible to add server side scripts to a page dynamically? Thanks in advance.

    protected override void OnInit(EventArgs e)
    {
    
        string formText = @"
    
    protected void Page\_Load(object sender, EventArgs e)
    {
        
    }
    
    protected void Button1\_Click(object sender, EventArgs e)
    {
        ((Button)sender).Text = TextBox1.Text;
    }
    

    ";
    Control dControl = Page.ParseControl(formText);

        Page.Form.Controls.Add(dControl);
    
        base.OnInit(e);
    }
    
    ASP.NET sysadmin tools question

  • Design-time render error for CompositeControl
    F Fayu

    I have a composite control that works fine during runtime. However, during design time I receive an error: " '3' could not be set on property 'TotalItems'". When I first add this composite control on a page, it is rendered correctly. After I close that page and reopen it, I get this error. This is what my propery looks like:

       \[Browsable(true),
        Bindable(true)\]
        public long TotalItems
        {
            get
            {
                if (ViewState\["TotalItems"\] == null) return 10;
    
                return Convert.ToInt64(ViewState\["TotalItems"\]);
            }
            set
            {
                ViewState\["TotalItems"\] = value;
    
            }
        }
    

    Here is what the class looks like:

    \[Designer(typeof(CompositeControlDesigner)),
    ParseChildren(true)\]
    public sealed class CustomGrid: CompositeControl, INamingContainer, IEnumerator
    {
    

    ...
    }

    Here is what the markup looks like:

    Let me know if any more info is required. Thanks in advance.

    ASP.NET html design help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups