[Message Deleted]
-
[Message Deleted]
-
[Message Deleted]
Since you have not mentioned which technology you are using it might be difficult for people to answer you.
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
-
Since you have not mentioned which technology you are using it might be difficult for people to answer you.
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
What do you mean technology? I'm writing this in C# using the data adapters and all that built into the IDE.
-
What do you mean technology? I'm writing this in C# using the data adapters and all that built into the IDE.
PyroManiak wrote:
What do you mean technology? I'm writing this in C# using the data adapters and all that built into the IDE.
That's helpful - You never mentioned any of this in your original post.
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
-
[Message Deleted]
I know that isn't really much help to you - but your query shows your skill level and the answer pitched at that skill level is too long for a forum response. My general advice is to not rely on wizards and binding until you understand how database interaction works. Then you can decide if wizards and binding are for you (I rejected them because they push me in to really bad designs - they are great for quick demos are conferences to woo the managers, but as a serious tool there is a long way to go yet.) I'd say that the best advice for you is to get a book on ADO.NET and find out how database interaction actually works rather than rely on wizards and binding. As a high level answer:
PyroManiak wrote:
new form loads (should be on current record, not record 1 which requires the user to navigate back and forth to find the right item.)
From your list box you will know what row you picked. You can use that information when populating the new form in order to get the correct row from the database. I don't know where these back and forward buttons come from. I'd guess it is some crazy wizard (hateful things so they are) that did that for you because it would require a fair bit of skill to write that sort of functionality - based on your question I'm guessing that is currently beyond your ken at the moment.
PyroManiak wrote:
I can't figure out how to do this without editing the SQL query to accept a parameter.
I'm assuming you mean parameter on the query - You will always need that if you want only one specific row. The parameter (or parameters) will define the value of the primary key for the row that you want. There is no way of getting around that unless you plan to pull across the entire table (and that is a waste of memory and network bandwidth)
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
-
I know that isn't really much help to you - but your query shows your skill level and the answer pitched at that skill level is too long for a forum response. My general advice is to not rely on wizards and binding until you understand how database interaction works. Then you can decide if wizards and binding are for you (I rejected them because they push me in to really bad designs - they are great for quick demos are conferences to woo the managers, but as a serious tool there is a long way to go yet.) I'd say that the best advice for you is to get a book on ADO.NET and find out how database interaction actually works rather than rely on wizards and binding. As a high level answer:
PyroManiak wrote:
new form loads (should be on current record, not record 1 which requires the user to navigate back and forth to find the right item.)
From your list box you will know what row you picked. You can use that information when populating the new form in order to get the correct row from the database. I don't know where these back and forward buttons come from. I'd guess it is some crazy wizard (hateful things so they are) that did that for you because it would require a fair bit of skill to write that sort of functionality - based on your question I'm guessing that is currently beyond your ken at the moment.
PyroManiak wrote:
I can't figure out how to do this without editing the SQL query to accept a parameter.
I'm assuming you mean parameter on the query - You will always need that if you want only one specific row. The parameter (or parameters) will define the value of the primary key for the row that you want. There is no way of getting around that unless you plan to pull across the entire table (and that is a waste of memory and network bandwidth)
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
What I meant by using a parameter is if I search for "part A" when the new form opens, it only populates the datatable with part a being record 1/1. This doesn't help me when I'm trying to add a new record or delete the current record because the actual table row is n/###. I'd appreciate an answer reguardless of how complicated it is. I understand the basics of ADO.NET, but that doesn't help when a function I'm looking for doesn't exist by any means I'd think to look for it. Thats no better then asking someone to make a Caesar Salad dressing, and having them screw it up because they didn't know to include anchovy paste, its not their fault for not knowing what isn't there, but that also doesn't mean that they are clueless in cooking.
-
What I meant by using a parameter is if I search for "part A" when the new form opens, it only populates the datatable with part a being record 1/1. This doesn't help me when I'm trying to add a new record or delete the current record because the actual table row is n/###. I'd appreciate an answer reguardless of how complicated it is. I understand the basics of ADO.NET, but that doesn't help when a function I'm looking for doesn't exist by any means I'd think to look for it. Thats no better then asking someone to make a Caesar Salad dressing, and having them screw it up because they didn't know to include anchovy paste, its not their fault for not knowing what isn't there, but that also doesn't mean that they are clueless in cooking.
I found what I was looking for... there is a .position for the bindingsource and I was able to pass my variable to it and everything works now. Was that really going to be such a hard answer?
-
I found what I was looking for... there is a .position for the bindingsource and I was able to pass my variable to it and everything works now. Was that really going to be such a hard answer?
PyroManiak wrote:
Was that really going to be such a hard answer?
From your description so far I would never have guessed.
Scottish Developers events: * .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog