User Profile

Collapse

Profile Sidebar

Collapse
dbrewerton
dbrewerton
Last Activity: Apr 6 '20, 09:04 PM
Joined: Nov 17 '09
Location: Honeoye, NY, USA
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Stored Procedure to provide results gives exception in c# code

    Ok, I'm not exactly certain what the problem is here but I will say I'm frustrated. The Stored Proc if directly executed works fine. When I try using it as part of loading a data table, it give an exception. However, the exception isn't really giving me any specific conditions, it says there's a problem but no details. My code:

    Code:
                    try
                    {
                        using (SqlCommand command
    ...
    See more | Go to post

  • If you use sv instead of s, exactly what happens? Does it error out?
    See more | Go to post

    Leave a comment:


  • Query works fine as direct query but not in stored proc

    Greetings experts. I'm trying to figure something out and I'm having no luck. This query works fine as a direct query but my requirement is to make it into a procedure. The error from the proc is "Invalid object name 'Query'". Here is the query.

    Code:
    SELECT TOP 5 Name, Sev, COUNT(SimID) AS Count
    FROM (
        SELECT C.Name, B.SimID, (CASE 
    	WHEN C.Sev = 1 THEN 'Low' 
    	WHEN C.Sev = 2 THEN 'Medium'
    ...
    See more | Go to post

  • PowerPoint slide produced by Spire is unreadable by PowerPoint

    Hey folks, I have code that is supposed to generate a PowerPoint chart automatically. However, whenever I implement this code, it breaks the slide. No idea why it does this but whatever. So, here is the code to call the slide builder helper:

    Code:
                    SqlCommand sqlcmdLOC = new SqlCommand(sqlQueryLOC, sqlconn);
                    using (SqlDataAdapter da1 = new SqlDataAdapter(sqlcmdLOC))
                    {
    ...
    See more | Go to post

  • Hi and thanks for getting back. Ok, I gave that a try but the result is still including the duplicates. So, say I have two apps, both are the same type of application however, the one with the higher count is the one I want if the date is more recent. Recall this is the data from the query:
    Code:
    App1-new | 1/12/2020 | ATeam | 500 | 100 | 800
    App1 | 1/11/2020 | ATeam | 500 | 100 | 764
    App2 | 1/08/2020 | ATeam | 500 | 100 |
    ...
    See more | Go to post

    Leave a comment:


  • dbrewerton
    started a topic Getting result with maximum date (Top 5)

    Getting result with maximum date (Top 5)

    Hello, I'm trying to figure something out for my query and could really use some help. I'm trying to get the top 5 results based on latest date. The issue I'm running into is trying to only get one result per application by maximum High Vuln Count. Here is my example data set.

    App | Last_Scan | Team | LOC | RiskLevel | HighVulns
    ----------------------------------------------------------
    App1-new | 1/12/2020 | ATeam...
    See more | Go to post

  • I finally figured it out. I had to query that Last Inserted ID outside the MySQL Execute statement.
    See more | Go to post

    Leave a comment:


  • Became a non-issue anyway, the project is dead. But I learned a lot nevertheless.
    See more | Go to post

    Leave a comment:


  • Getting last ID inserted into DB - value returned is "array" string?

    Hello folks, I'm trying to figure out how to get the last inserted ID from my database. The query runs but instead of getting the actual number inserted, I get the word Array returned. Here's the code, let me know how to fix this. Thanks! For what its worth, this is MySQL running PHP and the DB connection I believe is PDO.

    Code:
    	$query = $db->prepare("SELECT id from orders ORDER BY id DESC LIMIT 1");
    	$query->execute();
    ...
    See more | Go to post

  • And incidentally, this is a temporary table.
    See more | Go to post

    Leave a comment:


  • Ok, so your solution is completely rip the database and stored procedures apart that were written by someone else? If that were the answer I would not ask the question. Really not very helpful to be honest.
    See more | Go to post

    Leave a comment:


  • Querying all rows from range of numerically named columns

    Let us suppose the columns in my table read something like 100,101,102,103 ,104 and so on (for an extreme example 100 columns).

    What I am looking for is a way to see all rows in those columns but I want to specify two numbers, a low and high to specify my column range.

    Any idea how this can be done would be super. Thanks!
    See more | Go to post

  • Maintaining state of GridView Selections when adding new item to DB

    Hello folks, what I am trying to here is make it so I can add a new line item to my Grid View and maintain these items view state selections. What happens is I can either get the new item to show in my grid view or previous selections maintain their state. I cannot for the life of me figure out exactly how to do both. I do not care if the new item shows up at the beginning or end of the Grid View, I need the item to be added and previous selections...
    See more | Go to post

  • Need carousel - keep height same, width variable

    Ok, I know there has to be some way to do this. I was hoping to find a JQuery or PHP code that would take pictures in a folder and display them like in this video:

    https://yoursitenowdemo.tinytake.com...zQ3XzM1NDI0NjU

    Can someone help? I am using WordPress and tried MetaSlider, that was a no go - the width stays static. I've been banging my head against the wall but anything I found is just not it. Thanks guys!...
    See more | Go to post
    Last edited by Stewart Ross; Jul 12 '16, 06:28 PM. Reason: Merged content into original post and moved to CSS forum as requested

  • PowerShell script to run Fortify Scan gives errors

    Hello Experts! I am trying to build a script that performs automated scanning using HP Fortify from the command line. I thought I was passing my parameters correctly but something is not quite right. The command prompt script that does this is:

    Code:
    ECHO prime clean
    sourceanalyzer -b prime -clean
    
    ECHO prime translate
    sourceanalyzer -b prime %1 -debug -verbose -logfile prime.log -Dcom.fortify.sca.Phase0HigherOrder.Languages=python,ruby,javascript
    ...
    See more | Go to post

  • Grab Spreadsheet names then read each in Foreach

    Ok, I am trying to figure out the best way to accomplish this in code. I have a spreadsheet with numerous tabs and what I want to do is in C# read the name of each sheet and then its corresponding rows of data. Currently, this is what I have:

    Code:
                if (!DirectoryIsEmpty(DropZone.ToString()))
                {
    
                    DirectoryInfo di = new DirectoryInfo(DropZone);
                    FileInfo[] fi = di.GetFiles();
    ...
    See more | Go to post
    Last edited by dbrewerton; Oct 23 '14, 10:50 AM. Reason: Need for privatization of code

  • dbrewerton
    started a topic Service will not start

    Service will not start

    I was able to get the service to install just fine so that works good. When I start the service, it stops and I am getting no details on what is wrong. So here is my code:


    Code:
    using System;
    using System.Configuration;
    using System.Data;
    using System.Data.Common;
    using System.Data.OleDb;
    using System.Data.SqlClient;
    using System.IO;
    using System.ServiceProcess;
    using System.Text.RegularExpressions;
    ...
    See more | Go to post

  • dbrewerton
    replied to Unable to get service to install
    Never mind, this problem has been solved. I have a different question which I will post in a separate thread.
    See more | Go to post

    Leave a comment:


  • dbrewerton
    started a topic Unable to get service to install

    Unable to get service to install

    I am trying to get my service to install into services but it will not. When I go to the command line and run the InstallUtil.exe service.exe it fails miserably. This is what I get on my console:

    Code:
    The Install phase completed successfully, and the Commit phase is beginning.
    See the contents of the log file for the C:\publish code\Import\Import.
    exe assembly's progress.
    The file is located at C:\publish code\Import\Import.InstallLog.
    ...
    See more | Go to post
No activity results to display
Show More
Working...