User Profile

Collapse

Profile Sidebar

Collapse
nickvans
nickvans
Last Activity: May 7 '09, 05:24 PM
Joined: Aug 31 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nickvans
    replied to Dynamic Datagrid not showing up
    Well, I did what NeoPa suggested and created a dummy stored procedure that was far simpler. I discovered two things.

    1) For some reason, setting acceptable default values on the SQLServer side caused Visual Studio get angry and not display the gridview. As I said in my first post, the default values were acceptable and running the stored procedure with those default values caused the procedure to run correctly, so I'm at a bit of a loss....
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Dynamic Datagrid not showing up
    Thanks for the RE: NeoPa. I'll give it a shot and see if I can replicate it with a simpler scenario. I'll post my findings.

    Thanks!
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Dynamic Datagrid not showing up
    I'd certainly appreciate it, Frinavale!
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Dynamic Datagrid not showing up
    Well, thanks for trying to help. I'm sure the stored procedure runs correctly and returns data. Whats more, the SQLDataSource returns data when I go through the wizard and click "Test". The darn gridview just won't show up. I'm stumped.

    Thanks for trying!

    If anyone has any ideas, I'm all ears (err-- eyes).
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Dynamic Datagrid not showing up
    I renamed the procedure to "xx_ReportCusto m3_List" when I made it a CREATE procedure to make sure it executed properly after I added some comments.

    xx_NickTempMana gerReportCustom 3_List is the correct stored procedure.

    PS: sorry about using quote rather than code! I'll revise the post accordingly.

    Edit: Frinavale made it code rather than quotes for me already. Thanks!
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Dynamic Datagrid not showing up
    Here is the code for GridView4:

    Code:
    <asp:GridView ID="GridView4" runat="server" 
                        DataSourceID="SqlDataSourceRunCustomReport" 
                        ondatabound="GridView4_DataBound">
                    </asp:GridView>
    I've tried with both auto-generate columns true and false.
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Dynamic Datagrid not showing up
    Oh, I'm sorry. I misunderstood what you were asking for. Yes, the SQL code executes properly. I thought you were wanting to re-create the datasource.

    Here is the code for the sqlDataSource:

    Code:
                   <asp:SqlDataSource ID="SqlDataSourceRunCustomReport" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:CPF_TestConnectionString %>"
    ...
    See more | Go to post
    Last edited by Frinavale; Mar 9 '09, 07:28 PM. Reason: changed [quote] tags into [code] tags

    Leave a comment:


  • nickvans
    replied to Dynamic Datagrid not showing up
    Sure thing Frinny.

    The SQLDataSource uses this code:

    Code:
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    GO
    
    -- =============================================
    -- Author:		Nick
    -- Create date: 2/16/2009
    -- Description:	Recieves user input from front end and
    -- returns a list of tasks, their due dates, completion
    -- dates etc.
    -- =============================================
    ...
    See more | Go to post
    Last edited by Frinavale; Mar 9 '09, 06:02 PM. Reason: Changed Quote tags into Code tags

    Leave a comment:


  • nickvans
    started a topic Dynamic Datagrid not showing up

    Dynamic Datagrid not showing up

    Hi everyone,

    Thanks in advance for trying to help me out.

    I have a SQLDataSource which is running a dynamically generated SQL2005 stored procedure. (That is, the stored procedure creates a varchar string and ends with an exec(@string) command.) The datasource is used by a gridview to display the result. The stored procedure gets a number of parameters which set bit values for "use query criteria 1" , "use...
    See more | Go to post
    Last edited by Frinavale; Mar 9 '09, 02:58 PM. Reason: Moved to ASP.NET Answers from .NET

  • nickvans
    replied to Joining Statements in a Query
    Well, yet again I figured it out after posting the question. The secret (a very well publicized secret if you know to look for it) is to create a table variable, then select from that.

    Irritatingly, you have to give the table variable an alias to use a where clause, but such is the microsoft way.

    Thanks for looking.
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Joining Statements in a Query
    Thanks for taking a look for me ck.

    The data in each of the three queries looks like

    PROJECT varchar(50)
    OPENAI int

    and has data that looks like

    PROJECT | OPENAI
    Bill, 3
    John, 1
    NULL, 1
    Phil, 2

    Similarly the two other queries have columns (PROJECT | CLOSEDAI) and (PROJECT | LATEAI) with the same types of data in them.

    I think...
    See more | Go to post

    Leave a comment:


  • nickvans
    started a topic Joining Statements in a Query

    Joining Statements in a Query

    Hello everyone,

    I am new to SQL Server, and am having trouble joining several SELECT statements together.

    I have three SQL Select statements that do separate count operations to get the status of many projects. (One statement counts the number of open projects, one counts the number of completed projects, and the third one counts the number of late projects.) The count operations use GROUP BY project to operate.
    ...
    See more | Go to post

  • nickvans
    replied to SQL Server 2005 Pivot Table
    I figured out my problem. I was using the wrong Pivot arguments. The correct code for what I was trying to do is:
    Code:
    	SELECT [TIMESTAMP], [1] AS Green, [2] AS Yellow, [3] AS Red
    	FROM 
    	 (SELECT [TIMESTAMP], GYR_ID, RCOUNT
    		FROM dbo.HISTORIC_STOPLIGHT
    		WHERE PROGRAM=@PROGRAM) AS p
    	PIVOT
    	(
    		MAX(RCOUNT) FOR [GYR_ID] IN ( [1], [2], [3] )
    	) AS pvt
    	ORDER BY [TIMESTAMP]
    ...
    See more | Go to post

    Leave a comment:


  • nickvans
    started a topic SQL Server 2005 Pivot Table

    SQL Server 2005 Pivot Table

    Hello generous SQL experts!

    I'm new to the SQL Server environment, but am trying to get up to speed. I am trying to help a coworker create a pivot table for use with an Infragistics chart. I have data in the form of:

    [Timestamp] | GYR_ID | RCOUNT

    [Timestamp] is a smalldatetime
    GYR_ID is an int which represents a category (1=green, 2=yellow, 3=red)
    RCOUNT is how many of that category are present...
    See more | Go to post

  • nickvans
    started a topic exclude records that include given value

    exclude records that include given value

    Hello everyone!

    I have a question that should be rather simple, but I haven't been able to figure out a way to do it.

    I have a table which has assembly numbers, and another table with parts that go to these assemblies (1 to many relationship on field AssyNum), as well as a form with several text boxes for the user to input part numbers. If a value is input into a text box, a list on the form shows all AssyNum's that...
    See more | Go to post

  • nickvans
    replied to Combinations in Access
    Any additional thoughts, ADezii?...
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Determine if query "x" exists
    Works like a charm! Thanks Adezii....
    See more | Go to post

    Leave a comment:


  • nickvans
    started a topic Determine if query "x" exists

    Determine if query "x" exists

    Hello all,

    I have (hopefully) an easy question for you all. I'm running Access '03 and have created a pile of VBA code to create a form and some queries related to each control in the form. (Basically, it uses structured naming conventions to create a form with a bunch of combo boxes that allow the user to easily add and remove controls... anyway--)

    I am using the statement

    Code:
    With CurrentDb
    .QueryDefs.Delete
    ...
    See more | Go to post

  • nickvans
    replied to Iterate through form controls
    Update:

    Well, after scouring the internet and the Access help files, I was able to circumvent my problem by using this line

    [Forms]![Form1].Controls(intNu mber).Name = strBaseNumber & strSearchField

    and iterating intNumber by 2 every time the loop came around.
    See more | Go to post

    Leave a comment:


  • nickvans
    replied to Iterate through form controls
    Hey Jax, thanks for getting back to me.

    Well, I'm doing something like that as well, but for my purposes its not exactly what I'm looking for. I roughly 30 combo boxes that are created from my table, each of which I would like to rename.

    Below is the code I used to create the combo boxes in the form.

    Code:
    Function CreateComboBoxes()
    
    Dim dbs As DAO.Database
    Dim rstBaseNumber As DAO.Recordset
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...