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
U

USAFHokie80

@USAFHokie80
About
Posts
52
Topics
24
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Help using EF with DB2
    U USAFHokie80

    I have a WPF app and I'm attempting to switch from my MSSQL dev database to a DB2 database the app will actually run against. I have the DB2 drivers installed on my computer and I can connect to the server via WinSQL. I can't figure out how to set up the provider in my app.config to work though. I'd appreciate some info on the steps required or exactly what I need to configure to get this thing moving.

    C# csharp database sql-server wpf sysadmin

  • New to ASP/MVC: ajax submit to WebAPI endpoint
    U USAFHokie80

    I'm not sure of the best way to accomplish my goal. Looking for insight. I'm familiar with WebAPI services consumed through WPF and Silverlight but this is my first run at ASP and MVC. I am building a site to verify contents of a shipment against an electronic manifest (EDI 856). I have a page that displays the shipping data and I need the users to scan each item barcode in the container. I would then like to pass that barcode to a service, verify the item belongs in that shipment and then update the page to show as much. My plan was to have a single text box into which the user could scan/type the barcode and then submit that data to a WebAPI service which would verify the information and then probably use SignalR to send a message back to the page and update a grid with the item data. If this is a decent way to go, I'm just not quite sure how to use ajax to call the WebAPI endpoint and provide the data I need.

    ASP.NET csharp css asp-net wpf docker

  • New to ASP/MVC... Question about authentication
    U USAFHokie80

    So I'm completely new to ASP/MVC. Basically, I need to be able to create small site where the user logs in with network credentials that are validated against AD. I know how to do the AD validation part, but I do not know the proper way to authenticate the user for the web session with ASP. Can someone please give me a basic idea of how the authentication mechanism works here ? Thanks, Sam.

    ASP.NET question asp-net sysadmin security architecture

  • Execute Oracle Procedure from VB.NET ORA-009000 error
    U USAFHokie80

    You're right. Actually, I'm using Oracle's "SQL Developer". It was just easier to say SQLLite.

    Database csharp database oracle help

  • ORA-009000 Invalid SQL Statement when executing from code
    U USAFHokie80

    I cannot see how my asking this question could negatively affect anyone. It seems like people on here, like most of the internet, just want to complain about something. This is tantamount to chastising me for using an incorrect homonym in my sentences. And once again, the procedure runs flawlessly when execute from an Oracle client. If there were a problem with the code in the procedure I would have gotten an error. But, just to satisfy this useless endeavor, I'll indulge you.

    create or replace
    procedure UpdateUnitType as
    --updates unit type codes
    cnt number(10,0):=0;

    begin

    for u in (select * from unit where type_cd = 1)
    loop

    cnt := 0;
    
    select count(billet\_id)
    into cnt
    from billet
    where fiscal\_year = u.fiscal\_year
    and uic = u.uic;      
    
    if cnt > 0 then
    
      update unit
      set type\_cd = 2
      where unit\_id = u.unit\_id;
    
    end if;
    

    end loop;

    end updateunittype;

    Visual Basic database oracle tutorial question

  • Execute Oracle Procedure from VB.NET ORA-009000 error
    U USAFHokie80

    Here is the actual code, though I can't imagine why this would help:

    create or replace
    procedure UpdateUnitType as
    --updates unit type codes
    cnt number(10,0):=0;

    begin

    for u in (select * from unit where type_cd = 1)
    loop

    cnt := 0;
    
    select count(billet\_id)
    into cnt
    from billet
    where fiscal\_year = u.fiscal\_year
    and uic = u.uic;      
    
    if cnt > 0 then
    
      update unit
      set type\_cd = 2
      where unit\_id = u.unit\_id;
    
    end if;
    

    end loop;

    end updateunittype;

    Database csharp database oracle help

  • Execute Oracle Procedure from VB.NET ORA-009000 error
    U USAFHokie80

    I didn't share the scrip because it works when it's execute on the server. The code I provided has identical signatures. There are no parameters passed into the procedure. Perhaps that is a problem - that since I didn't pass any parameters the Oracle library doesn't want to execute the command even though there are no parameters for the procedure.

    Database csharp database oracle help

  • ORA-009000 Invalid SQL Statement when executing from code
    U USAFHokie80

    Thanks for the concern, but I think that I'm probably the best one to decide what is or isn't confusing to me. As for the error, you apparently don't understand. The procedure signature is identical to what I've posted. Only the name of the procedure is different. And as I stated, the procedure itself works perfectly well when executed from SQLLite command line client as "execute DoSomething;". So the problem actually is with the way it's being called from code and -not- the database. That is the complete statement, again, with only the actual name changed.

    Visual Basic database oracle tutorial question

  • Execute Oracle Procedure from VB.NET ORA-009000 error
    U USAFHokie80

    No, the procedure works correctly when I execute it from SQLLite.

    Database csharp database oracle help

  • ORA-009000 Invalid SQL Statement when executing from code
    U USAFHokie80

    Oh, I'm terribly sorry that I added another few hundred duplicate bytes the massive amount of data stored here. However will this site possibly be useful now that I've completely gummed it up???? What in incredibly silly thing to get upset about. Report me to the admins, quick! BTW, since I don't actually know the traffic on the individual discussions and since this question very clearly spans multiple topics, I don't see the problem here. So if you don't like my post and have nothing to contribute other than being a pompous jerk, feel free to pass over my posts.

    Visual Basic database oracle tutorial question

  • ORA-009000 Invalid SQL Statement when executing from code
    U USAFHokie80

    Yes. This is a only a problem calling the procedure from code.

    Visual Basic database oracle tutorial question

  • ORA-009000 Invalid SQL Statement when executing from code
    U USAFHokie80

    Hi. So I know I've done this before but I can't get it to work despite every example on the internet telling me it should... I'm trying to call a procedure from code. I keep getting an "Invalid SQL statement" exception. Any ideas why? And yes, the procedure compiles and gives no errors when calling from an oracle client.

    create procedure DoSomething
    as
    begin
    --does some calculations and updates some rows
    end DoSomething;

    I try to execute from code like so:

    Using conn = New OracleConnection(MyConnectionString)
    Using cmd = conn.CreateCommand()
    cmd.CommandType = CommandType.StoredProcedure
    cmd.CommandText = "DoSomething"
    conn.Open()
    cmd.ExecuteNonQuery()
    conn.Close()
    End Using
    End Using

    At which point I get the aforementioned exception. What am I doing wrong? Sam.

    Visual Basic database oracle tutorial question

  • Execute Oracle Procedure from VB.NET ORA-009000 error
    U USAFHokie80

    Yes, it works fine if I call it from an oracle client. This is only a problem trying to execute it from code.

    Database csharp database oracle help

  • Execute Oracle Procedure from VB.NET ORA-009000 error
    U USAFHokie80

    Hi. So I know I've done this before but I can't get it to work despite every example on the internet telling me it should... I'm trying to call a procedure from code. I keep getting an "Invalid SQL statement" exception. Any ideas why?

    create procedure DoSomething
    as
    begin
    --does some calculations and updates some rows
    end DoSomething;

    I try to execute from code like so:

    Using conn = New OracleConnection(MyConnectionString)
    Using cmd = conn.CreateCommand()
    cmd.CommandType = CommandType.StoredProcedure
    cmd.CommandText = "DoSomething"
    conn.Open()
    cmd.ExecuteNonQuery()
    conn.Close()
    End Using
    End Using

    At which point I get the aforementioned exception. What am I doing wrong? Sam.

    Database csharp database oracle help

  • How to get TreeView SelectedItem/Value?
    U USAFHokie80

    Why can't you just bind SelectedItem from the TreeView to your VM ?

    WPF tutorial data-structures question

  • Custom mapping with AutoMapper
    U USAFHokie80

    So I have a class like so:

    public class foo
    {
    int Code {get;set;}
    String Meaning {get;set;}
    }

    And I want to be able to map an integer type onto the Code property of this class:

    int someNumber = 10;
    foo someFoo = new foo();
    AutoMapper.Mapper.Map(someNumber, someFoo);

    I've tried a few different things but haven't gotten it to work. Any suggestions, please ?

    .NET (Core and Framework) question

  • Binding converter in code behind
    U USAFHokie80

    Thanks for the reply. SetBinding doesn't exist on the GridViewDataColumn type though... I did figure it out, however:

    Dim c = New Telerik.Windows.Controls.GridViewDataColumn With {.Header = sched.ShipName,
    .IsReadOnly = True,
    .IsFilterable = True,
    .IsSortable = True,
    .IsGroupable = False,
    .ShowFieldFilters = True,
    .ShowDistinctFilters = False,
    .DataMemberBinding = New System.Windows.Data.Binding With {.Converter = New ColumnConverter(),
    .ConverterParameter = (s + 1).ToString}
    }
    Dim backgroundBinding As New System.Windows.Data.Binding With {.Converter = New BackgroundColorConverter,
    .ConverterParameter = (s + 1).ToString}

                backgroundBinding.Source = c
                System.Windows.Data.BindingOperations.SetBinding(c, Telerik.Windows.Controls.GridViewDataColumn.BackgroundProperty, backgroundBinding)
    
                columnCollection.Add(c)
    
    WPF question css wpf wcf tutorial

  • Binding converter in code behind
    U USAFHokie80

    Hi... So I'm creating a column collection for a data grid in the code behind because I don't know the number of columns needed until run time. I need to bind the background color to a converter but i'm not sure how to do it. The background property is typed as a Brush, but of course the converter is a binding... so how do I get this working? In the code below, the "DataMemberBinding" works because that property is a binding type... So I just need to get the background working. Thanks, Sam.

    Dim c = New Telerik.Windows.Controls.GridViewDataColumn With {.Header = sched.ShipName,
    .IsReadOnly = True,
    .IsFilterable = True,
    .IsSortable = True,
    .Background = New System.Windows.Data.Binding With {.Converter = New BackgroundColorConverter(),
    .ConverterParameter = (s + 1).ToString},
    .IsGroupable = False,
    .ShowFieldFilters = True,
    .ShowDistinctFilters = False,
    .DataMemberBinding = New System.Windows.Data.Binding With {.Converter = New ColumnConverter(),
    .ConverterParameter = (s + 1).ToString}
    }
    columnCollection.Add(c)

    WPF question css wpf wcf tutorial

  • Post publish events ?
    U USAFHokie80

    Hey guys... I'm using VS2012. After publishing a web sit project to disk, I'd like to automatically run some commands similar to the way you can do post-build commands. Is there any way to do this? Thanks. Sam

    Visual Studio 2015 & .NET 4.6 question

  • Windows 8, Get list of drives
    U USAFHokie80

    Hi guys... I'm just starting with Windows 8/Metro... I'm trying to figure out how to get a list of drives on the machine. The MSDN says Environment.GetLogicalDrives should work or System.IO.Directory.GetLogicalDrives but I can't seem to find either. I assume the framework for Metro apps is limited similar to how Silverlight is a subset of the .Net libraries... Anyone have any idea how to do this?

    Windows Development csharp tutorial question workspace
  • Login

  • Don't have an account? Register

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