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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

david mindplay com

@david mindplay com
About
Posts
23
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problems with multithreading - HELP [modified]
    D david mindplay com

    Fixed. Problem had nothing to do with multithreading. Code was getting stuck in a while loop. My own dumb fault. A single call to System.Threading.Thread.Sleep inside the while loop brought CPU usage down from 85-100% to 12-18%.

    Visual Basic sysadmin help question

  • Problems with multithreading - HELP [modified]
    D david mindplay com

    First of all, let me state that I am new to multithreading. I am working on a project that makes constant queries to a network device via a tcp connection. These queries can generally take about a third to a half a second to complete. As it stands I am creating several (4-5) separate threads that loop and make queries then report the result data to my main thread. Each thread maintains it's own tcp connection to the device. Each of the threads is set to sleep for an entire second each loop cycle, each of the threads is set to lowest priority. Yet CPU usage is through the roof. And i'm using a modern 3+ ghz machine. Why is my application eating up so much CPU time? Is there a cure for this, am I doing something wrong? Please help. -- modified at 19:01 Friday 25th August, 2006

    Visual Basic sysadmin help question

  • Simple Reports/ RTF output
    D david mindplay com

    I see, thank you. I'm reading about CSS right now. Dave

    XML / XSL xml help csharp database tools

  • Simple Reports/ RTF output
    D david mindplay com

    I would need the end product to be one single file, so that it can be saved or emailed. If I use XSLT to transform my data into HTML then it would be one file. I don't know much about CSS. Can I use CSS to create an HTML file or would I essentially have two files my XML and my CSS? Thanks

    XML / XSL xml help csharp database tools

  • Simple Reports/ RTF output
    D david mindplay com

    HTML would be ok. If it could look the same on the screen as it would on printed paper. Also, I would have to learn HTML, which I thankfully have been able to avoid up to this point. Can HTML do tables and margins and such? Forgive my ignorance. Also, the end users of the application's reporting feature will be school teachers, who aren’t known for being very computer savvy. If I use the default browser to open and view reports, I’ll get thousands of tech support calls because a teacher has lost the browser window behind the application window. It’s hard to explain the concept of “[Alt]+[Tab]” to school teachers. :-D The application hides the task bar so that kids aren’t messing with it instead of using the application. If I were to use HTML, I would have to use one of those browser window controls on a form in order to prevent the “[Alt]+[Tab]” problem. Thanks

    XML / XSL xml help csharp database tools

  • GDI+ Video Acceleration
    D david mindplay com

    Did Microsoft ever implement video acceleration compatablity for GDI+? or is it still software only? I remember there was some talk about this when I first started using GDI+ a couple of years ago. Just wondering if anything ever came of it. Thanks

    .NET (Core and Framework) winforms graphics question

  • Simple Reports/ RTF output
    D david mindplay com

    I’ve got a problem, I’m hoping someone out there has the answer to. I am a .Net programmer working for a small educational software company. I need to add some simple reporting to the project I am working on. Basically, I need to take some data from my database and format a RTF document from it that can then be displayed in a rich text box or printed or saved or whatever. Unfortunately RTF code is not so easy to understand. I was told by someone that I could use XSLT to do this. After some reading I found out that this is not exactly correct. You can use XSLT, however you still need to be able to write RTF code. I could use XSL-FO, but since .Net does not implement XSL-FO, I would need to use a third party tool in order to transform my XML data and XSLT stylesheet to RTF. My company doesn’t want to pay for one of these third party tools, nor do they want to deal with any complex licensing issues, that come along with them. Does anyone have any suggestions on how I can accomplish this task? The reports are not complex, just some simple text formatting and tables. Thanks for your help

    XML / XSL xml help csharp database tools

  • Datasets - Totally Stumped - Am I stupid or something?
    D david mindplay com

    > Should do. I'll have to check into it. Lord, I hope so. Keeping my fingers crossed. > If you want another reason to implement parameterised queries then you should know that it helps prevent SQL Injection Attacks Yea, I know about those. Although, In my case I doubt I would have to worry about that in an elementary school setting, but you never know I suppose. Also, This is not a web based product.

    Database database algorithms tutorial question announcement

  • Datasets - Totally Stumped - Am I stupid or something?
    D david mindplay com

    I thought not. Yea, Yea I'm fairly familiar with SQL syntax and dealing with databases in general. Just not stored procedures, paramaterized querys or anything having to do with datasets or databinding.

    Database database algorithms tutorial question announcement

  • Datasets - Totally Stumped - Am I stupid or something?
    D david mindplay com

    Hmmm, I've heard of this before. OK, pain in the butt changing syntax between providers, but doable. Does this work with ODBC/MySQL? If so, we might have something here. I'll have to look into this more deeply. Thanks.

    Database database algorithms tutorial question announcement

  • Datasets - Totally Stumped - Am I stupid or something?
    D david mindplay com

    Yea, I already thought of that. Problem is, I need to use data returned from the second select statement to create the third. So that doesn't work. Or, wait a minute "SELECT *" am i just supposed to get a copy of the entire damn database? That just seems wacky. Is that how you are supposed to use datasets? Copy the entire database in its entirety!? Holy crap, what if there are thousands of records and you only need to deal with a couple? See, the whole dataset concept just dosen't make any sense to me. :confused:

    Database database algorithms tutorial question announcement

  • Datasets - Totally Stumped - Am I stupid or something?
    D david mindplay com

    That's what I always thought and that is why I've never tried messing with them until now. Datasets always seemed over redundant to me. Why have a copy of my tables, they are already in the database!? I don't understand how they can make anything easier if 400 pages of your avarage ADO.NET book is dedicated to datasets (and their associated classes) and only about 10 pages or less on datareaders. Datareaders and Datacommands are very straight forward and easy to understand and use. Using datasets is just overcomplicating things. Also, I've never bound anything to anything and I don't see the need. I thought that maybe insted of using datamembers inside my class, I could just use a dataset and have properties that access the dataset directly. I'm giving up at this point. I'm just going to do it a different way. I've wasted almost three days on this now. I wanted to use datasets because they can keep track of changes and what has been deleted, then do the appropriate things with the data source when updating. This is all well and good, but it seems to me like there is just as much work involved with using the datasets as it is to just keep track of that stuff myself. Maybe if I was able to use stored procedures across the board It would be a more viable option. Also, I wanted to use datasets because, I guess you can store strings in the database and not have to worry about special characters like ' and ;. Is this true? Right now I'm having a hell of a time with storing strings containing special characters. Thanks.

    Database database algorithms tutorial question announcement

  • Datasets - Totally Stumped - Am I stupid or something?
    D david mindplay com

    > Use stored procedures (if you can, not all DBMS support them). Yea, that's one of the major problems. The application absolutly must be able to use MySQL in addition to Access (we use jet for standalone versions) and SQL Server/MSDE. We market to many elementary/middle schools and we offer MySQL as a low cost alternative to MS SQL Server. Most elementary/middle schools can't afford SQL Server and use too many concurrent connections for MSDE to handle. I don't think MySQL supports stored procedures. I could be wrong hovever. I've never messed with stored procedures and a lot of the code examples I can find on this subject use them, so it makes it that much more confusing to me. In most of my code I just use datareaders and datacommands to interact with the database. I've been told that this is "doing it the hard way". But, it seems to work just fine for what I am using it for. Now I am doing something else that lends itself nicely to using datasets and I am having a heck of a time figuring it out. I'ts making me feel really dumb. Although I did teach myself C# and VB.Net using only books and no help from anyone and the only programming experience I had prior to that was vb6 and a tiny bit of C++/MFC, so I figure I'm not totally brain dead. What I really need is for somone to sit down with me and look at my code and tell me what I am doing wrong and how to implement datasets into this class I am working on. Unfortunatly, the only other programmer I know is my boss and he knows nothing of .NET only C++/MFC. Dave is frustrated! :mad:

    Database database algorithms tutorial question announcement

  • Datasets - Totally Stumped - Am I stupid or something?
    D david mindplay com

    Can't figure out datasets to save my life. I like the idea of having a little relational database at my fingertips that can keep track of changes and update the datasource automatically. I can get my head around that part. What I can't figure out is how to get data in and out of a dataset. For instance I need to read in data from three separate tables in my database into a dataset. All the documentation I have read only deals with one table. can't figure out how to read in multiple tables without using multiple dataadapters/datacommands. Not to mention that I already have to deal with three sets of objects. One for OleDb one for Sql and One for ODBC. The application must be able to work with Many different providers. It's already driving me up the wall that I have to do everything three different ways everytime I do anything. It's making my code a little long winded. Now I have to implement these blasted datasets and I don't want to have 9 separate dataadapters 9 separate datacommands and 3 separate connection objects. Can't find any good documentation, I have many books and have been searching the internet for days. About ready to tear what's left of my hair out. Can anyone explain how to fill and update datasets containing multiple tables in a simple way that a stupid dummy like me can understand? Thanks.

    Database database algorithms tutorial question announcement

  • Dealing with special characters in SQL queries
    D david mindplay com

    And why are you stiking your tounge out at me. That's not nice. :((

    Database database help tutorial csharp

  • Dealing with special characters in SQL queries
    D david mindplay com

    Yea, But I hate datasets. They just seem so redundant to me. I already have a database so what's the point of making a copy of the tables in code. I already have tables, there in the database. Plus, I've already got everything working, so to change everything over to use those silly datasets would take a lot of time that I don't have. Sending Non-Queries and using data readers is faster anyway.

    Database database help tutorial csharp

  • Dealing with special characters in SQL queries
    D david mindplay com

    Could you give me an example?

    Database database help tutorial csharp

  • Dealing with special characters in SQL queries
    D david mindplay com

    Alright, I'm about ready to yank what's left of my hair out. Hopefully someone out there has the answer to my problem. Here it is… I want to allow users to type any damn fool thing they want into a text field and then store that string in a database. I don’t like the idea of disallowing certain characters. I’d like to figure a way to store any string in the database regardless of what silly characters the user inputs. I’ve done quite a bit of looking around on the internet for the answer to this problem. Surprisingly no one seems to have a good answer. I thought this would be easy and that I would find a viable answer right away. I have to admit that I am a little disappointed with the development community as a whole right now. For shame! Anyway, I figured out how to deal with apostrophes and “single-qoutes”. ‘ this character whatever you call it anyway. If you simply double-up an apostrophe in a SQL query, for example: the string “Mr. O’Connell” would be changed to “Mr. O’’Connell”. This seems to work fine. Here’s the problem that’s killing me, what if the string was “Mr. O”Connell”, now what do you do. Obviously, it would be stupid to use a quotation mark it this way, but I want to allow users to indulge their stupidity. How in the heck do you put that in a SQL query without invoking a database error? Also, what about other special characters like: \ @ # $ % and so on. What if the string was something like this “Mr. “\@#$’%”. There has got to be an answer. Not that it matters a whole lot, but the application is written in VB.Net and I am querying against a MS Access database. Access is just for now, when the application is finished users will have the option of several different providers such as: Access, SQL Server or My SQL. Please Help

    Database database help tutorial csharp

  • Automatic Updates - Please help
    D david mindplay com

    Dear anyone who can help, I am a programmer currently working for an educational software company. We have a windows product that uses a centralized database on a server that serves entire school systems with data over a WAN. Right now it is in the beta stage of development. We are having a delema and are hoping somone has the answer. The problem is: each of the workstations, and there can be thousands, need to be updated with patches every so often as they become availible. We can write an app. that runs when the workstation program starts, to check with the server to see if there is a patch availible and wheather or not the latest one has been applied or not. Then download it and install it. The only catch is, most times the workstation app. is started by students, and they are often times logged on to windows as a limited users. And when you are logged on to windows as a limited user, windows will not let you save files, except to certain, rather useless places for our purpose. Also, windows will not let you run programs that update or install things. Basically what we want is for the app. to start up and automatically update itself if there are updates availible. Thus making it much easier and less of a hassle to computer illiterate teachers, administrators and students. Who would otherwize have to apply a patch to each and every single workstation. That way the only person who has to worry about it is the top level sys-admin and all he/she has to do is post the latest avalible updates on the centralized server. Is there a way to achive this? Thanks for your help, If you require more info just ask.

    System Admin help css database sysadmin beta-testing

  • Advanced Collision Detection with GDI+
    D david mindplay com

    Hey Phil, I've got one more problem. I've been taken the data you gave me and assembled it into a 2DVector class. I am almost finished but I am stuck on one thing. Is there an equasion to determine the bering in degrees from the vector coords? I can't seem to find the answer to this question anywere on the internet. I've been through pages and pages of search results for hours today and I'm starting to get a little pissed off. Thanks, dB

    .NET (Core and Framework) csharp graphics help lounge
  • Login

  • Don't have an account? Register

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