Search results

  1. cjard

    Question How to access my windows form application database via the internet

    Genuinely the simplest approach would be to use an app like VNC, Remote Desktop, TeamViewer, GoToMyPC (those are in rough order of ease of use from hard to easy) etc that just shows you a window with the contents of your computer, over the internet, and remote control the computer to click...
  2. cjard

    Question New way to interact with cmd though windows forms

    It may be that the new binary isn't reading from std in in quite the same way; perhaps you could try upgrading your code so that it first reads from std out; checks that the app is asking for a username, writes the username to std in, reads from std out again (password this time); then writes to...
  3. cjard

    Question New way to interact with cmd though windows forms

    And what does the new binary do when you run it in a DOS prompt, manually?
  4. cjard

    Question Displaying information on a windows form.

    Cor. That's quite a block of code. Tell you what, for this iteration of the program don't bother with the background worker, just put this at the start of your FOR loop that does 4000 things: If i Mod 10 = 0 Then Application.DoEvents() viz: For i = 0 To 39999 If i Mod 10 = 0...
  5. cjard

    Question Concurrency Violation. Can't force an edit into the database.

    I posted a 4 step process to adding a typed dataset to your project. You actually only need to do step 1, the other 3 were introducing you to how to work with it. Step 1 is a 4, maybe 5 page wizard that takes me in the region of 15 seconds to complete. The only way o make it less complicated...
  6. cjard

    Question Concurrency Violation. Can't force an edit into the database.

    I iterate the data table and set every row to have an uppercase surname; that's an edit to the row I'm not quite sure why you'd add a primary key that is an auto number, and have another column that is guaranteed unique. Make your produce code the primary key of your database table. This will...
  7. cjard

    Question Concurrency Violation. Can't force an edit into the database.

    See the part above where I wrote: 'example to iterate all rows and alter things ForEach ro as PeopelRow in ds.People ro.LastName = ro.LastName.ToUpper() Next ro I disagree that you don't have a problem adding rows; your data access strategy and code can be improved measurably to be more...
  8. cjard

    Question Concurrency Violation. Can't force an edit into the database.

    It revolves around the was the database query in the data adapter is structured. This article will give you some background info: https://msdn.microsoft.com/en-us/library/aa0416cz(v=vs.110).aspx Essentially, your update command looks like this: UPDATE people SET name =@newname WHERE id = @id...
  9. cjard

    Changing Cursor depending on drop position within a RichTextBox

    Small tip, in terms of UI design, avoid the temptation to put a MessageBox telling the user that they dropped a field in an illegal place; they're very disruptive to the UI/work flow and could reasonably happen quite often. Coloring the illegal field, and showing a message in a normal label near...
  10. cjard

    Question VS2013 Table Adapter Syntax Error: Expecting identifier or quoted identifier

    Bit of an odd way to write a query, but try doing a simpler one in the tableadapter wizard (one that selects all the columns you want, including dummies for any columsn coming from a join you omit) and then directly pasting the complex one into the CommandText property of the select command on...
  11. cjard

    Changing Cursor depending on drop position within a RichTextBox

    Had a play around with a few things, and the simplest hack(though it may have some caveats) would actually be to place transparent panels (or other controls) on top of your report covering regions where you don't want a drag to drop To see this in action lash a new form into a test project...
  12. cjard

    Changing Cursor depending on drop position within a RichTextBox

    You're going to have to find an event or sequence of events that indicate the start of your dragging, for example when I select some text inside a RTB and drag it, a MouseCaptureChanged immediately followed by a MouseLeave occurs. By using a class-wide boolean (that is normally false, you toggle...
  13. cjard

    Question Passing parameter to oracle tableadapter

    Consider uploading all your nasal data into a temporary table in the oracle db, then use SQL queries to do the compare Example to find data on one table but not both, use a full outer join where table1 pk is null or table2 pk is null To compare rows data for inequality, inner join on pk where...
  14. cjard

    Library Management - school project

    Let's try and make your life a bit easier.. Click the DW4 link in my signature, and then read "Creating a Simple Data Application" Follow the example exactly first time, then throw your app away, then follow the example again but using your database instead. Then come back here
  15. cjard

    Optimize code In Textchange Richtextbox

    Think about what it's doing for a second though. Every time you change as small amount as ONE CHARACTER, your code will search the text box contents (lets assume it is 1 megabyte of text) for each one of 740 words. That's 740 megabytes of text searched every time you press a key! No wonder the...
  16. cjard

    Code works whenever network connection ended!

    Plenty of ways, assuming that youre trying to find a way to stop your program from exiting immediately after it starts Make it a windows forms app, paste this code into the class file for the main form: Imports System Imports System.Net Imports System.Net.NetworkInformation Public Class...
  17. cjard

    Question update from sql table where maximum date

    Using MAX(Ontledings.analisedatum) indicates you're trying to update a single row, the most recent one - correct? You want to find the most recent row in Ontledings (as according to whichever row has the highest analisedatum) and update another table with info from that latest row In SQL server...
  18. cjard

    File Reading and Writing

    Looks like it should work. Tell me if this gives any different result (it should write all lines regardless of whether they contain an @ symbol or are 581 long): ' ------------------------------------------------------------------------------------------------------ ' VARIABLES FOR TXT...
  19. cjard

    Getting certain item from two related tables in a dataset

    If you use strongly typed datasets, then it becomes a simple matter of: 'if t2 is a child of t1, then for any given row in t1 get all the child rows in t2 someTable1Row.Gettable2Rows() 'if t2 is a child of t1, then for any given row in t2, access the parent row someTable2Row.table1Row...
  20. cjard

    Question Dataset creates new designer.vb file

    delete the code in bold modify the LastGenOutput that references the ...1.designer.vb (remove the 1) delete both code files on disk right click the xsd in VS and choose Run Custom Tool
Top Bottom