Sign In  Sign Up Live-Chat

AdHoc FilteredSql is Always returning [Temp] for the table name.

Last post 11-30-2007, 9:32 AM by dean. 1 replies.
Sort Posts: Previous Next
  •  11-30-2007, 1:15 AM 104646

    AdHoc FilteredSql is Always returning [Temp] for the table name.

    Hello;

    I am saving off my queries to a database table. However, everytime they get saved off, the table name in the From statement always shows up as [Temp] not matter what.  Got any solutions for this?

     

    Thanks,

    Ed

    protected void ButtonSaveQuery_Click(object sender, EventArgs e)

    Session.Add("filteredquery", AdHoc1.FilteredSQL);

    Response.Write("<SCRIPT language=javascript>var w=window.open('saveQuery.aspx','SaveQueries','height=800,width=800,status=yes,toolbar=no,menubar=no,location=no, scrollbars=yes, resizeable=yes');</SCRIPT>");

    }

    Query is as follows:

    "SELECT [DateofContact], [FVSPA_Age], [GenderDescription], [IssueDescription], [locationDescription], [ParticipantTypeDescription], [programID], [programName], [sumAmericanIndian], [sumAsian], [sumBlack], [sumCaucasian], [sumHispanic], [sumNativeAlaskan], [sumPacificIslander], [sumUnknown], [VAWA_AGE] FROM [Temp] WHERE ((([programID] = 'AFS'))) ORDER BY [programID]"

     
  •  11-30-2007, 9:32 AM 104734 in reply to 104646

    Re: AdHoc FilteredSql is Always returning [Temp] for the table name.

    Hi,

       Please set the TableName property as you want in the properties panel of the VS,

    or you can set it by writing code within the Page_Load function as showing below:

     

    private void Page_Load(object sender, System.EventArgs e)
       {
        .....
             if (!this.IsPostBack)
             {
                 ......
                 this.AdHoc1.TableName = "Products";
                 ......
             }
        }

     

     


    Dean Deng
    Lead Developer
    Aspose Guangzhou Team
    About Us
    Contact Us
     
View as RSS news feed in XML