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.
USAFHokie80
Posts
-
Help using EF with DB2 -
New to ASP/MVC: ajax submit to WebAPI endpointI'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.
-
New to ASP/MVC... Question about authenticationSo 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.
-
Execute Oracle Procedure from VB.NET ORA-009000 errorYou're right. Actually, I'm using Oracle's "SQL Developer". It was just easier to say SQLLite.
-
ORA-009000 Invalid SQL Statement when executing from codeI 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)
loopcnt := 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;
-
Execute Oracle Procedure from VB.NET ORA-009000 errorHere 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)
loopcnt := 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;
-
Execute Oracle Procedure from VB.NET ORA-009000 errorI 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.
-
ORA-009000 Invalid SQL Statement when executing from codeThanks 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.
-
Execute Oracle Procedure from VB.NET ORA-009000 errorNo, the procedure works correctly when I execute it from SQLLite.
-
ORA-009000 Invalid SQL Statement when executing from codeOh, 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.
-
ORA-009000 Invalid SQL Statement when executing from codeYes. This is a only a problem calling the procedure from code.
-
ORA-009000 Invalid SQL Statement when executing from codeHi. 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 UsingAt which point I get the aforementioned exception. What am I doing wrong? Sam.
-
Execute Oracle Procedure from VB.NET ORA-009000 errorYes, it works fine if I call it from an oracle client. This is only a problem trying to execute it from code.
-
Execute Oracle Procedure from VB.NET ORA-009000 errorHi. 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 UsingAt which point I get the aforementioned exception. What am I doing wrong? Sam.
-
How to get TreeView SelectedItem/Value?Why can't you just bind SelectedItem from the TreeView to your VM ?
-
Custom mapping with AutoMapperSo 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 ?
-
Binding converter in code behindThanks 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)
-
Binding converter in code behindHi... 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) -
Post publish events ?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
-
Windows 8, Get list of drivesHi 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?