|
Which of the three DataAdapters are you asking about? What are you expecting to happen? It doesn't even appear you are using the first one. You are creating DataSets then never using them. I would say this could also be handled better with a stored procedure. And lastly, you're using VB
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hello,
Sorry bout not giving good info for my question, the problem came from my 3rd dataAdapter
at this part:
'update changes to quantity of book catalogue records when borrowing///////////////////
da3 = New SqlDataAdapter("Select * from BookCatalogueTable where txtAccessionNo='" lvItems.Items(j).SubItems(0).Text & "'", con)
da3.Fill(dt3)
dt3.Rows(0).BeginEdit()
dt3.Rows(0).Item("intQuantity") = Val(dt3.Rows(0).Item("intQuantity")) - 1
dt3.Rows(0).EndEdit()
Dim cb3 As New SqlCommandBuilder(da3)
da3.Update(dt3)
My da3 suppose to load again the new query while its on a loop block so that I can Subtract those quantity value,but my da3 doesn't refresh the query that will load new records.
For example my da3 select query at first is "Select * from BookCatalogueTable where txtAccessionNo='1'". After I update the table the new da3 select query for example become "Select * from BookCatalogueTable where txtAccessionNo='2'".My da3 does not execute the next query instead it still using the first query.
If my question is not yet clear I can still clarify to the best I can.
I'm really confuse why my da3 doesn't load the new query.
All comments and suggestion are soo much appreciated.
Thanks,
Dan
|
|
|
|
|
As I said, this is better handled with other methods, i.e. not using a DataAdapter for everything. You creating far too much overhead and I'm sure your code doesn't perform well. Use a stored proc to handle this, or use SqlCommands directly.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hello experts,
I would like to ask if how can I show some specific records only in my listview coming from my database
table.My Database is Sql Server 2005 and I am using vb 2008 as the programming language.
Scenerio:
BorrowTable
ID | Last Name |
1 | mrDan
1 | mrDan
2 | mrsDan
2 | mrsDan
I have a table in my database with name BorrowTable as shown above for example, my problem is I would
like to show the transaction records of people in table.To be more precise bec I cant so much
explain my problem I want to display it like this way in my listview
ID | Last Name |
1 | mrDan
2 | mrsDan
Below here is the code, its working but it just show all the records I have tried "group by" as select query to my sqlDataAdapter but it's not working.
Public Sub LoadListViewReturn(ByVal lvReturnList As ListView, ByVal con As SqlConnection)
Try
If con.State = ConnectionState.Open Then
con.Close()
End If
Dim dt As New DataTable
Dim ds As New DataSet
ds.Tables.Add(dt)
Dim da As New SqlDataAdapter
con.Open()
da = New SqlDataAdapter("Select * from BorrowTransactionTable ", con)
da.Fill(dt)
For Each r As DataRow In dt.Rows
lvReturnList.Items.Add(r("txtTransactionID"))
lvReturnList.Items(lvReturnList.Items.Count - 1).SubItems.Add(r("txtLastName"))
lvReturnList.Items(lvReturnList.Items.Count - 1).SubItems.Add(r("txtFirstName"))
lvReturnList.Items(lvReturnList.Items.Count - 1).SubItems.Add(r("txtMI"))
lvReturnList.Items(lvReturnList.Items.Count - 1).SubItems.Add(r("txtPosition"))
Next
con.Close()
Catch ex As Exception
MsgBox(ex.ToString)
con.Close()
End Try
End Sub
Any comments and suggestions are so much appreciated.
Thanks,
Dan
|
|
|
|
|
So you want the DISTINCT[^] keyword. You'd better replace the asterisk by the actual list of fields you want returned then, and specify which of those MUST be distinct.
|
|
|
|
|
Hello,
Thank you so much this is really the answer I was looking for
Thanks also the link it was super helpfull.Now I can finish the System I am doing,
I am stuck in that part due to filtering my listview.
Thank so much,
Dan
|
|
|
|
|
You're welcome.
|
|
|
|
|
So, my neighbor, who I didn't realize knew I was a 'computer person' came around last night and asked if I would be able to take a look at a friends USB drive to see if I could get anything off it. Wanting to make friends with my neighbors I said I could take a look. So, if the USB drive isn't being recognized (what I would think most users would term "not working"), then unless her USB controller fried, I'm going to have a hard time investigating something I can't communicate with.
That aside, it got me onto the thought of file recovery. So, I have a few questions;
Is .NET able to communicate with hardware at a low enough level that I could query the contents of a piece of hardware? (I know about the IO namespace and the ability to enumerate drives etc.). If not, am I picking back up C++?
How do I go about finding resources on teaching me how to investigate, verify and re-assemble(if necessary) files. I went 4-5 pages into google searches and was just seeing data-recovery software/companies.
|
|
|
|
|
hammerstein05 wrote: Is .NET able to communicate with hardware at a low enough level that I could query the contents of a piece of hardware?
If there's an API for it, you can p/invoke it. Bear in mind that C++ will use the API then .NET should be able to - I'm not saying that it's the right tool for the job, but you can do it.
|
|
|
|
|
|
You might want to post this against the OP so that they receive the email. They won't be notified of your reply to my answer.
|
|
|
|
|
D'oh!! Good point
edit : had to remove previous message - seems I can't post the same message twice.
Days spent at sea are not deducted from one's alloted span - Phoenician proverb
modified on Wednesday, September 22, 2010 10:44 AM
|
|
|
|
|
Although you could roll your own, you might be quicker to use one of the off-the-shelf recovery programmes - I think writing something like this would be a pretty major undertaking.
Here are a couple of pretty good packages which might get your neighbour's data back fairly quickly :-
PhotoRec[^] comes highly recommended, and should deal with most types of media, and most types of file.
Foremost[^] is also worth a look...
Days spent at sea are not deducted from one's alloted span - Phoenician proverb
|
|
|
|
|
Oh, If the drive is that bad I will be suggesting a third party tool.
My questions were mainly based around making this a research project for myself, no timescales. I'm interested in understanding. Whenever I see pieces of software where people charge such a varying amount for, I'm always curious as to the true effort involved. I don't expect this to be a 3 hour coding project, but I would like to find more reading material on it
|
|
|
|
|
Hi,
does anyone know a free .NET crypter/protector? My problem is, that there are many free obfuscators I could use, but with obfuscation all the code (also in Log and Tracefiles) is blurred and our developement team is no longer able to assigne the error codes to a function.
So, does anyone know of a possibility to obfuscate code without blurring special function names? A tool, which just obfuscates the "in-function" code like algorithms?
Or is there maybe a completely different solution for my problem?
Thanks for any advice!
Cheers, cheery
|
|
|
|
|
What you want is near to impossible, or at least very difficult. I believe professional obfuscation tools might be able to do what you need, at least partially, but you can't get those for free.
Anyway, no obfuscation algorithm can protect your code. If you keep your method names unchanged - probably because you need descriptive names - then your code cannot really be obfuscated. A good descriptive method name pretty much says what the method does (that's its purpose, in the end), which helps a lot to any potential reverse-engineer.
As for the method body, automatic obfuscation usually only consists of renaming all identifiers and a few more well-defined steps. The algorithm has no knowledge of your code and it can only do very little because it must not break your code.
|
|
|
|
|
There is control-flow obfuscation though
|
|
|
|
|
spaghettization?
|
|
|
|
|
cherrymotion wrote: all the code (also in Log and Tracefiles) is blurred and our developement team is no longer able to assigne the error codes to a function.
They're using reflection to determine the name of the current function? How about replacing those with encrypted constants? Should be easy to decrypt. Wouldn't recommend on doing that change manually though; best to create a small app that modifies the current source-files.
cherrymotion wrote: Or is there maybe a completely different solution for my problem?
There's no solution, merely patches.
I are Troll
|
|
|
|
|
Currently, my IT department has rolled out to my user community the following CasPol.exe setting:
"c:\Windows\Microsoft.NET\Framework\v1.1.4322\CasPol.exe" -m -ag All_Code -url http://ProdServer/App1/* FullTrust -n App1
The new version of the application says that the following CasPol.exe command needs to be executed because the application is now a .NET 2.0 application.
"c:\Windows\Microsoft.NET\Framework\v2.0.50727\CasPol.exe" -m -ag All_Code -url http://ProdServer/App1/* FullTrust -n App1
Is this really necessary ?
I have to roll out the new version of the application to 70 desktops and this would require that the CasPol.exe command be issued to all of those users. (The users are not local Admins, so it may be a bit tricky to run in a logon script.) Right ?
Cheers.
David
|
|
|
|
|
Well, I finaaly had to upgrade the system and YES, I did have to go to each desktop and run the CasPol.exe command under .NET 2.0 in order for it to work.
Just wanted to let everyone know what the answer was.
|
|
|
|
|
Hi All,
I have Typed Datasets, I am creating Table Adapters for them. What I want is, I want to create the table adapters with parameters. Is there any way to create table adapters
with parameters and with relations. So that, if we select a specific department in "dept" table then the Employee table adapter also picks only those employees from "Employee"
table who belongs to that particular dept.
Is there any way please help me in this regards, I am new to Typed Datasets. Any links or suggestions will be of great help.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
indian143 wrote: Any links
There's a Howto[^] article and the general overview[^] on MSDN that might be helpfull. You can change the version of the targeted framework with the link on top of the page.
I are Troll
|
|
|
|
|
Bit of a strange one here guys (And if anyone can suggest a more appropriate forum, please do!).
We have a fairly complex (111 projects spread across asp.net, silverlight, WFC, Ria Services etc) solution, which builds correctly on my dev box (2010). If I fire up VS on our build machine, I can also build the solution correctly. However, when I queue a build, it almost makes it through, until it attempts to run SGen - at which point I get the old "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information." chestnut.
I've googled to try to find a solution, but nothing appears to do the job - the error is occurring at complile time rather than runtime, and I've added the v2 activation key to Team build host's config file to no effect. There are no tests in the solution which might cause things to be loaded.
Any ideas? Anyone? Particularly confused that VS can build ok on the server, but team build fails.
C# has already designed away most of the tedium of C++.
|
|
|
|
|
Hi
I'm working on a Spectrum analyzer application and need some help to get the graphics updated in an optimal manner.
Whenever my program receives a new block of audio data I do an FFT and I then update the oldest FFT data (a column) in my 2D-matrix which is then copied to a bitmap for display. So this spectrogram is shifted horizontally as data arrives in blocks. I see two options for achieving the shifting of the NxM bitmap whenever a new FFT output block arrives:
1. Copy columns [0:M-2] to [1:M-1] and then copy in the new FFT data...hope the notation makes sense. This requires a lot of memory copying and I hope to avoid that using GDI.
2. Replace the "oldest" column (the matrix works as a circular buffer in the time-direction) and let GDI ensure that when wrap-around happens GDI the remaining columns (the columns up to the column where the new FFT data resides) are copied to the bitmap. I once did a spectrum Analyzer in C++ project using OpenGL that supports this functionality. Can find the project anymore..I tried to look for it to find the name of the instruction used. Does GDI/GDI+ support this?
Do any of you guys know how I get to do this efficiently?
Thx
Tom
modified on Sunday, September 19, 2010 8:00 PM
|
|
|
|