|
Sedro posted:Do you have Client Access installed? Does the driver show up in the ODBC Administration outside of VS? Yes you need Client Access for the connection to an AS/400, I did this a couple weeks ago and it should work straight away. The only thing you need to be aware of when working with the AS/400 is that you check the IBM redbooks on some weird things in the driver. I've never come across these things when using something like Postgress or SQLite, it does some magic in returning the proper DB2 fieldtypes to .Net mappings IIRC. I thought it was odd, that is why I remember.
|
# ? Dec 2, 2015 05:43 |
|
|
# ? Jun 6, 2024 17:25 |
|
Sedro posted:Do you have Client Access installed? Does the driver show up in the ODBC Administration outside of VS? Yes - at least I think so I wasn't sure if I had to add the ODBC package as an add-on or something for VS.
|
# ? Dec 2, 2015 14:02 |
|
Yeah, my VS2012 doesn't have the driver either. The Client Access installer adds its provider to machine.config, but VS seems to load them from the registry. You could probably add the registry entries with some effort.
|
# ? Dec 2, 2015 18:07 |
|
Bob Morales posted:Yes - at least I think so You can install the extra libraries by running the Client Access setup again and choosing .Net libraries under "ODBC" IIRC. It doesn't get installed by default. This has an explanation and samples: https://www.redbooks.ibm.com/redbooks/pdfs/sg246440.pdf This also the Redbook I used to query and insert into our AS/400 system. The command I remembered is DeriveParameters() otherwise nothing works. There is also a Nuget package that just installs the .Net driver but I haven't used that.
|
# ? Dec 2, 2015 19:11 |
|
Bob Morales posted:Yes - at least I think so Check your 32 bit ODBC sources. Visual Studio isn't 64 bit (yet).
|
# ? Dec 2, 2015 23:01 |
|
So I am about to embark on my first UWP app -and- also my first use of JSON in an app -and- also my first VS2015 app (from ground up). It will connect to a REST api and use authentication via cookies. Any libraries or packages out there I should look into? Any good write-ups I could read? Any new features in VS2015 to make life easier? I've googled a bit and read some interesting things but, I don't know "what's new" as some stuff already written looks a few years old. Usually doing WPF/ORM apps in a DB environment so this is a ton of firsts for me. edit: Here's something I've read but it is for VS2012. crashdome fucked around with this message at 01:22 on Dec 3, 2015 |
# ? Dec 3, 2015 01:07 |
|
crashdome posted:So I am about to embark on my first UWP app -and- also my first use of JSON in an app -and- also my first VS2015 app (from ground up). It will connect to a REST api and use authentication via cookies. Any libraries or packages out there I should look into? Any good write-ups I could read? Any new features in VS2015 to make life easier? Things to Google, in loose order of decreasing importance: HttpClient (the C# one, not Apache) async/await CookieContainer Newtonsoft.Json (aka JsonConvert) Strangely, the article you linked doesn't mention HttpClient at all even though that was the hotness around the article's publishing date.
|
# ? Dec 3, 2015 02:27 |
|
I updated my Visual Studio 2015 from Update 1 RC to Update 1 release. Now when I start the application I get an error sound and it locks up on the start page. Is this happening to anyone else?
|
# ? Dec 3, 2015 02:46 |
|
Bognar posted:Things to Google, in loose order of decreasing importance: Thanks. I'm checking those out right now. I assume HttpClient has something over the WebClient or HttpWebRequest as they mentioned?
|
# ? Dec 3, 2015 06:20 |
|
crashdome posted:Thanks. I'm checking those out right now. I assume HttpClient has something over the WebClient or HttpWebRequest as they mentioned? This is a fairly good comparison. Looks like HttpClient (or RestSharp) might be the way to go: http://www.diogonunes.com/blog/webclient-vs-httpclient-vs-httpwebrequest/
|
# ? Dec 3, 2015 10:58 |
|
The time required to install Update 1 is atrocious.
|
# ? Dec 3, 2015 15:04 |
|
I have something like the following targeting .Net 4.0 ( yea XP support! )code:
|
# ? Dec 3, 2015 17:41 |
|
Just a quick rant but the fact that I can't simply doC# code:
|
# ? Dec 3, 2015 18:14 |
|
Well sure, mutable lists are invariant. What would happen if you add SomeOthingThing : IThing to the list? Immutable lists to the rescue, right? C# code:
|
# ? Dec 3, 2015 18:58 |
|
Munkeymon posted:Just a quick rant but the fact that I can't simply do So, you actually can do this with IEnumerable<T>, because the generic parameter is defined as out T. You can't do it with IList<T>, since it has methods like int IndexOf(T item). This is probably confusing if you're not familiar with covariance and contravariance so I can give a better explanation if necessary.
|
# ? Dec 3, 2015 19:13 |
|
Have any of you ran into an issue with NuGet packages after installing VS15 update 1? Installed the update, went to rebuild my solution and got one of these errors for each projectcode:
Kuvo fucked around with this message at 19:17 on Dec 3, 2015 |
# ? Dec 3, 2015 19:15 |
|
fankey posted:I have something like the following targeting .Net 4.0 ( yea XP support! ) Do you have control over the Manager class? If so, make it support polling a cancellation token. If not, you can do ghetto Task cancellation (not recommended): C# code:
|
# ? Dec 3, 2015 19:23 |
|
Bognar posted:Do you have control over the Manager class? If so, make it support polling a cancellation token. Thinking about this more - I don't need to cancel the Manager operation. In my case the Manager stuff is always running and actually shouldn't be canceled. I just need to stop my task from waiting if I don't hear from the Manager in a given amount of time.
|
# ? Dec 3, 2015 19:47 |
|
Bognar posted:So, you actually can do this with IEnumerable<T>, because the generic parameter is defined as out T. You can't do it with IList<T>, since it has methods like int IndexOf(T item). This is probably confusing if you're not familiar with covariance and contravariance so I can give a better explanation if necessary. I have a fuzzy familiarity with covariance and contravariance but I don't immediately see why IndexOf(T[ of IThing] item) can't be made to work. Because the item argument is implicitly cast to IThing so asking for the index of a not-IThing and null are equivalent and therefore ambiguous?
|
# ? Dec 3, 2015 19:51 |
|
Munkeymon posted:I have a fuzzy familiarity with covariance and contravariance but I don't immediately see why IndexOf(T[ of IThing] item) can't be made to work. Because the item argument is implicitly cast to IThing so asking for the index of a not-IThing and null are equivalent and therefore ambiguous? The problem is that you're providing an implementation of IList for parameter of type Thing, not IThing. Here's some code to demonstrate: C# code:
Bognar fucked around with this message at 20:06 on Dec 3, 2015 |
# ? Dec 3, 2015 20:03 |
|
Munkeymon posted:Just a quick rant but the fact that I can't simply do What is it exactly you want to do that wouldn't work if you did C# code:
|
# ? Dec 3, 2015 20:22 |
|
Bognar posted:The problem is that you're providing an implementation of IList for parameter of type Thing, not IThing. hell, I was just thinking about it backwards because it made sense as soon as I read that. NihilCredo posted:What is it exactly you want to do that wouldn't work if you did Use a method defined to return a List<Thing> without jumping through an annoying hoop. Munkeymon fucked around with this message at 20:34 on Dec 3, 2015 |
# ? Dec 3, 2015 20:32 |
|
Munkeymon posted:Just a quick rant but the fact that I can't simply do C# code:
|
# ? Dec 3, 2015 20:52 |
|
Kuvo posted:Have any of you ran into an issue with NuGet packages after installing VS15 update 1? Installed the update, went to rebuild my solution and got one of these errors for each project It's talking about the project.json file, not project.lock.json. (If this is the error message it gives now then I don't understand how it could ever have worked before, unless there were unrelated changes like deleting project.json). Here's an example. I'm writing a Console app which targets .NETFramework 4.5.2. I wished to use Nuget3 (project.json) instead of NuGet2 (packages.config) because of the advantages it brings, such as not messing up my .csproj file. Here is the project.json that I will use: code:
Incidentally, I used to have "win-anycpu" in there. In Update1 it seems to require me to change it to just "win". I don't know if that's true, and I don't know the how or why. I haven't been able to find any documentation on the permitted "frameworks" or "runtimes". ljw1004 fucked around with this message at 00:19 on Dec 4, 2015 |
# ? Dec 4, 2015 00:16 |
|
fankey posted:I'd like to add the ability to cancel (or return false ) the task if the Done handler doesn't get called within a certain amount of time. What would be the easiest way to accomplish this? I assume I need a CancellationSource but can't find a simple example that ties it all together. I want to walk through this step by step. First off, I think your "Go" method is very nicely written with its use of TaskCompletionSource, but I think it's a poor candidate for returning "async void". I'd make it an async task, and use try/finally to make sure the handlers get unhooked: code:
You're basically following the "Task-over-event" pattern. I assume that your manager has some cooperative way of telling it to abort, e.g. a method "manager.Abort()" which will request it to stop whatever it's doing, and when it gets round to stopping, then it will fire its DoneHandler(false), where the flag indicates whether it succeeded. code:
code:
code:
|
# ? Dec 4, 2015 00:39 |
|
Begby posted:
It's not so obvious that would be a problem in the case of a container that's just storing and retrieving objects, though, and it seems like you could design a type system where that list could store OtherThings but they'd all come back out as IThings because that's the declared type of the list. Obviously that's not C#'s (the CLR's?) supported type system and again, I'm probably mixing paradigms in my head because I've been all over the place with languages.
|
# ? Dec 4, 2015 16:19 |
|
InstallShield is a steaming pile of buggy dogshit and it will be the death of me.
|
# ? Dec 4, 2015 17:31 |
|
Munkeymon posted:It's not so obvious that would be a problem in the case of a container that's just storing and retrieving objects, though, and it seems like you could design a type system where that list could store OtherThings but they'd all come back out as IThings because that's the declared type of the list. The problem isn't really that they all come out as IThings, it's more that when they go in it's expected to be of type Thing. Casting a List<Thing> to IList<IThing> (if it was possible) doesn't change the runtime type, it just changes the representation to the compiler. So the Add method on List<Thing> would still expect a Thing, regardless of it being represented as IList<IThing>.
|
# ? Dec 4, 2015 17:31 |
|
epalm posted:InstallShield is a steaming pile of buggy dogshit and it will be the death of me. Worse than ClickOnce?
|
# ? Dec 4, 2015 17:41 |
|
Why would a sql query generated from Entity Framework take minutes to execute, yet when the same query is run within SSMS, it takes less than a second? Entity Framework 6.1.3 SQL Server 2005 Enterprise I'm grabbing the sql generated using the Infrastructure Interception DatabaseLogger registered in web.config. I'm unable to trace or profile in SSMS due to a current lack of permissions so I don't have any other details yet.
|
# ? Dec 4, 2015 17:54 |
|
kingcrimbud posted:Why would a sql query generated from Entity Framework take minutes to execute, yet when the same query is run within SSMS, it takes less than a second? Are you by chance doing a insert? In my experience entity inserts are terribly slow. Entity also seems to take a larger performance hit do to missing keys and indexes than raw sql.
|
# ? Dec 4, 2015 18:01 |
|
Bognar posted:The problem isn't really that they all come out as IThings, it's more that when they go in it's expected to be of type Thing. Casting a List<Thing> to IList<IThing> (if it was possible) doesn't change the runtime type, it just changes the representation to the compiler. So the Add method on List<Thing> would still expect a Thing, regardless of it being represented as IList<IThing>. Yeah, I get all that. I'm not sure that writing the IL equivalent of ListOfThings.Add(OtherThing) would do when run since I don't expect a list to try to manipulate or interact much with what you hand it. It totally makes sense that it wouldn't Just Work in your previous example, but it (maybe just superficially) looks like you could take the C# type system and extend it a bit to use, say, ref to mean you promise to just store reference(s) to this type without interacting with it in much the same way out was extended. I'm not even sure that'd be useful at this point - just saying it looks feasible. Does anyone know if there's a ctrl+key combination to add fixed tags like with italics and bold? I'm sick of typing the stupid things.
|
# ? Dec 4, 2015 18:11 |
|
Calidus posted:Are you by chance doing a insert? In my experience entity inserts are terribly slow. Entity also seems to take a larger performance hit do to missing keys and indexes than raw sql. It's a simple select, top 100 from table_x, joined to table_y. Filters are on a few table_y columns. The database has no constraints and I'm not sure the indexes it does have are even relevant. Hard to tell until I can get additional db permissions.
|
# ? Dec 4, 2015 18:25 |
|
ljw1004 posted:It's talking about the project.json file, not project.lock.json. (If this is the error message it gives now then I don't understand how it could ever have worked before, unless there were unrelated changes like deleting project.json). Thanks for the info. What confuses me is that these project have both a packages.config and a project.lock.json, but no project.json. This is strange as I checked the extensions section of VS and it shows NuGet 3.3.0.167 installed, which if i understand right should require the project.json file. Additionally, the project.lock.json file isnt in the format you mentioned (the one described here). I ended up getting the project to build by renaming the project.lock.json file to something else but I'm wondering if this will break the package management in the future
|
# ? Dec 4, 2015 19:00 |
|
Ok, so, if I want to use ASP.NET 5 but have a third party library that depends on custom configuration sections in the old app/web.config format... am I completely boned? Or is there a way to make these still work?
|
# ? Dec 4, 2015 19:08 |
|
ljw1004 posted:I want to walk through this step by step.... code:
|
# ? Dec 4, 2015 19:12 |
|
Kuvo posted:What confuses me is that these project have both a packages.config and a project.lock.json, but no project.json. This is strange as I checked the extensions section of VS and it shows NuGet 3.3.0.167 installed, which if i understand right should require the project.json file. The Nuget3.3.0.167 client (and all clients going forwards) understand both NuGet2 "packages.config" and NuGet3 "project.json" style projects. Your project must be either packages.config based (meaning it lacks both project.json and project.lock.json) or project.json based (meaning it lacks packages.config). If you have both files then you'll get bizarre error messages. That's because some parts of VS key off the existence of project.lock.json to understand what kind of project you're in, and others key off the existence of project.json/packages.config. If you wish your project to be a "project.config" style project going forwards, then you should make sure to delete both project.json and project.lock.json if you have them, then unload, then reload. Do you have project.lock.json checked into source control? It shouldn't be. Project.lock.json is an intermediate file that's generated upon project build (prior to msbuild being invoked). It's always safe to delete this file. I wish they'd stored it in the "obj" directory to make this clear.
|
# ? Dec 4, 2015 20:53 |
|
fankey posted:I want to collect all the Data passed in until I get a FrameEnd. If I don't get a FrameEnd in a given amount of time then I want to throw and exception. Taking your suggestions, would something like this work? ... That looks exactly right to me!
|
# ? Dec 4, 2015 20:55 |
|
ljw1004 posted:The Nuget3.3.0.167 client (and all clients going forwards) understand both NuGet2 "packages.config" and NuGet3 "project.json" style projects. packages.config is in source control but project.json isnt so i guess the VS update somehow generated it, causing the errors. Thanks for the clarification!
|
# ? Dec 4, 2015 21:05 |
|
|
# ? Jun 6, 2024 17:25 |
|
kingcrimbud posted:Why would a sql query generated from Entity Framework take minutes to execute, yet when the same query is run within SSMS, it takes less than a second? This might be because the execution plan used for the EF query is different to the one used in the SSMS query - SQL Server generates and caches execution plans based on a whole bunch of factors, and it's possible that the SSMS query has different SET options that renders SQL Server unable to reuse the plan from the EF query. Greybeard Erland Sommarskog goes into a hell of a lot of detail on this subject.
|
# ? Dec 5, 2015 02:54 |