• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Elwren

  • Rank
  1. I am trying to do some analysis using a very deep recursive call routine and I am getting StackOverflowExceptions being thrown. I know that it is not an infinite recursion/loop and it is just the stack being maxed out so I was wondering if there was a way to increase the stack size? I've looked around the web and all I've learned is that the stack is typically 1MB big so I would like to make it 2MB for this analysis. Any thoughts? Some places mentioned using some "/f [size]" in the command line but it wasn't working for me for something. I'm using Visual C# Express Edition 2005. Thanks!
  2. Hey, I am using ADO.net to insert/delete data in my Access database in a program I have. I am also using the OleDbCommandBuilder to automatically generate the INSERT/DELETE/UPDATE commands. The problem is: When I am trying to insert a row into one of my tables, it says "Dynamic SQL generation can not be used on multiple base tables". I believe this is because the table I am trying to insert a row into, has a foreign key in it that comes from a different table. I presume that is what the error means by 'multiple base table'. I'm not exactly sure but I guess the problem is with the OleDbCommandBuilder. My first question is: do most people use the CommandBuilders to generate the sql commands automatically? Secondly, if I don't use the CommandBuilder, how exactly do I insert the row and have it updated into my actual Access database. Do I have to set the InsertCommand property of my DataAdapter for every table and then do something with that? Thanks for the help. If you know how to fix the issue with 'multiple base tables' and my CommandBuilder, that also would be great. Thanks
  3. What other option is there other than to use cascade delete? I need to delete a record out of a table and I cannot because of foreign key issues. What else can I do? Any suggestion is welcome.
  4. Hey, I am working on a program involving a database and I do not know that much regarding database programming. Currently I am connecting to a MS Access database with OleDB and am using the OleDbCommandBuilder to have it make all my INSERT/MODIFY/DELETE commands. However, I have tables with various foreign keys in them and I need to perform a cascade delete to delete the parent and all its children in the different tables. I get an error when just using my regular delete method, which is: // CODE DataTable deletedContentTable = myDataSet.Tables["TABLE_NAME"].GetChanges(DataRowState.Deleted); myDataAdapter.Update(deletedContentTable); deletedContentTable.Dispose(); myDataSet.AcceptChanges(); // END CODE This does not currently perform a cascade delete. Does anyone know how I can force it or turn on cascade delete with the OleDbCommandBuilder? Or do I have just have to write my own special SQL commands to do these DELETE's? Thanks for the help.
  5. Hey, I hope this isn't in the wrong forum but sorry of it is. My question is: On a particular project I'm working on, I have one machine set up that is constantly receiving data (24/7) from a server and then it uses that live-stream of data and uses it for other analyatical purposes. The problem is since this computer is always receiving data non-stop, the analytical parts of the computer are really slow because of the networking overhead. I am planning to get another machine to seperate the networking/analytical tasks of the machine and have my 2nd machine be free of the networking overhead so it can operate on the data more effeciently. I was wondering what was the best way to set this up. I was thinking about having these two desktops hooked up to the same external hard drive(is this even possible?) and using some sort of multi processor programming with mutexes and such (I'm not that familiar with this) so both computers could work in unison with the same hard drive. My second thought would be to have two external hard drives (one for each computer) and as the networking computer receives the data and stores it in its hard drive, it reroutes it to the analytical computer's hard drive to be stored there but I'm not sure if this rerouting will cause the same overhead that I already have. Just wondering what would be your take on this issue and what are my options. Thanks for the help!
  6. I don't like computers

    I'm really baffled by this argument too. You may say "computers suck" but try living without them and see how much you yearn for the "pointing and clicking" again. When I have a task that needs completed, I can easily go to the computer and get it done. E-mail, pay bills, make an Excel worksheet or Word document...all this is readily available in one place. Sure there may be a slight learning curve to learn the functionality of certain programs, but it is extremely small in comparison to the amount of time it would take to do a task without a computer. The whole framework of computers with mouses and windows is ingenious to me and I wouldn't have it any other way. Limited mouse control and organized tables just wouldn't give me that ease of use that I have now with my computer. In short, I love computers, I love pointing and clicking, and I love Microsoft.
  7. I love the smell of burnt Iraqi's in the morning.

    That's strange...I work on Kirtland AFB where this vehicle was tested at. Maybe I'll go for a walk today to try to find it? =D
  8. Bitwise Operators

    Ya well either I'm still being stupid or bitwise operators do not work on ushorts in C#. I always get an error on the following code: using System; class ReverseBytes { public ushort setByte(byte source, ushort dest, int byteNum) { ushort mask; if(byteNum == 0) { mask = 0xFF00; dest = dest & mask; dest = dest | source; } else if(byteNum == 1) { mask = 0x00FF; dest = dest & mask; source = source << 8; dest = dest | source; } else exit(1); returnd dest; } static void Main(string[] args) { ushort testValue = 310; byte b1 = 54; byte b2 249; Sytem.WriteLine("Old value is {0}", testValue); testValue = setByte(b2, testValue, 0); testValue = setByte(b1, testValue, 1); System.WriteLine("New value is {0}", testValue); } } The error is CS0266:Cannot implicitly convert type 'int' to 'ushort'. An explicit conversion exists (are you missing a cast?). Do I have to always cast them as ints to get it to work? It doesn't make sense to me why they would restrict bitwise operators to just regular integers in C# either. Maybe its just my C# skills are not up to par as I am just starting to learn it.
  9. Hey, I'm a little confused on what data types you can use bitwise operators (specifically the & operator) on. I've use the & operator before on ints and unsigned ints (32 and 16 bit data types) and it worked fine in C. Howeverin C it did not work with 64 bit data types (such as a double). Now I'm using C# and it seems it will only take a regular 32 bit int for these operators. I checked MSDN and either I'm stupid or I couldn't decipher an accurate answer on this. It seems C# will only take ints (not ushort values) whereas C can take both (int and unsigned int) values. Am I making sense or just continually babbling? Could somebody explain a little what values these operators can take in. Thanks a lot.
  10. I was wondering if anyone knew of a good place for tutorial/on-line book that discusses how to create a GUI with C#. I've googled it and have not really found something with much substance (which is suprising). I'm not new to programming so any tutorial on this should be fine. I'm planning to order a book (suggestions are welcome) once I get back home (away for the summer on an internship) but I wanted to get my feet wet while I'm still here. I'm not using Visual Studio of any version so I'm not really sure how that plays into anything as I think they have built-in features to do various tasks. Thanks for the help.
  11. Programming Project

    Oh and it doesn't have to be a game. Sorry wasn't clear about that. I know this is GameDev.Net but I just want to learn the inner workings of the language right now. Interesting idea SiCrane. So maybe some type of database system with a little GUI? Can't say I'm interested in YuGiOh but maybe I can think of another implementation of this.
  12. Hello, I was wondering if anyone had any ideas for a decent sized general programming project. I am wanting to learn C# (already know C/C++/Java) and I know that the only way to really learn the in's and out's of a language is to work on a project (not simple little tasks you see in books or school assignments). Anywho, anything would be fine as this is just a learning process. I do, however, do not want it to contain any OpenGL/DirectX as I'm not interested in graphics at this point. Thanks.
  13. Portable Software

    Thanks man. Sorry I wasn't clear as I wanted to be. I'm talking about all types of portability no matter what envirnment the software is in. So whether it is OS, compilers, hardware, etc. I am looking for all the information I can get on anything. I'll check out the link...should be a good resource.
  14. I was wondering if anyone knew of any good books/tutorials that focused on developing portable software. Looking around Google, there wasn't really much to use. I know there is a book "Write Portable Software" by Brian Hook that will be coming up mid July, but I was wondering if there was any other resources that I could use? Thanks for the help.
  15. Hey, I'm using VIM to code in and came to a silly issue where I have really long strings that go past the desired 80 column length. How do I separate this string into different lines? I thought it would be a '\' at the end of the line but this doesn't work. I tried google'n it but wasn't really sure what to search for. Thanks for the help.
  • Advertisement