|
Ed Barnes wrote: I checked the copy local and it was set correctly. I even checked the version of
ADODB.dll and it was the same as on the original machine and the Path was
correct. At that point I'd start to suspect the target-machine to have some version registered in a different location. A failed setup can cause weird configurations - you might want to run a Registry-checker on the machine, and try and find out if there's multiple versions of the JET engine installed. (Multiple versions of Access or similar products)
A DataTable[^] would be comparable to a recordset - encapsulates a single table containing multiple rows. I'd recommend to stay away from the DataAdapter.
Ed Barnes wrote: I've never done an entire program using OleDb that I can remember There's a first time for everything
Again, if you struggle with a specific pattern, post it here and we'll translate it.
Ed Barnes wrote: of course at my advanced age of 81, what I remember and what is a fact may be completely different Facts are revised all the time - stick with memory, it is more stable.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Okay, Thanks: Data Tables.
But "Facts are revised all the time - stick with memory, it is more stable" I'm not sure about that. My mother used to tell me that I remembered all sorts of things that never happened.
|
|
|
|
|
Ed Barnes wrote: My mother used to tell me that I remembered all sorts of things that never happened. Yah, ditto, and I'm not half that age. Most of us carry some false memories, for various reasons.
I can never remember the price of groceries, always going up. I don't remember summers like the last one, it nearly rained every day. I hardly remember being the hydrant, but I do remember being the dog.
Vaguely.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi, i have been thinking a long time in making a software to use my webcam to control the mouse on my PC, I have been searching but I can not find something based on VB.NET (I only work with VB and I have limited experience). So I want to tell you what I have been thinking hoping you can help me.
I only need to take real time video, convert it into images, compare the new image with the last one and find if there is a change in the position, calculate how much it change in X and Y and take those values to set mouse pointer movement (I mean if the image change 1 pixel in the Y axis then make the mouse move 1 pixel in the same direction). Most software focus on one object, may be one hand, one color, etc. What I need is just to use the whole image to know if it moves and where does it moves. This is because I wont use the cam standing on my desk, I want to hack it and use it as a laser pointer, so where I aim my cam in an image projected by a video-beam there will be the mouse.
Hope I made myself clear and you could help me.
Thanks in advance.
|
|
|
|
|
You might want to examine, very closely, two consecutive images you get from a web cam before you put a ton of effort into this project. EVERY image is different, all over the image. What you consider to be a "change" must be under a threshold value.
Also, since most monitors today exceed the resolution of a web cam, you'll find that your definition of a "pixel" is not going to be anywhere close to "precise".
What do you mean by "video beam"? Are you talking about a non-moving laser spot on a wall?
|
|
|
|
|
Hi Dave, thanks for your answer, actually I have limited experience with VB.NET, I have been working in a software to use it in my work but I am learning on the way, anytime I need to do something I do a research and apply it on my software but this will be a personal project. I am also new on the page, is my first post asking help.
What I would like to do is kind of emulate the process done by the computer mouse. It has a low res cam that take images form the surface and compare them to get the delta X and delta Y. also the trackpad of an Blackberry phone uses the same principies. to help you understand watch this video to see what I want to learn to do.
http://www.youtube.com/watch?v=57kTrKJHOjM
Thanks a lot.
|
|
|
|
|
OK, so you're taking consecutive pictures and comparing them to see which way the picture has moved.
The problem with this is that you cannot do a pixel-by-pixel comparison as you have to no idea how far the image has moved and which way the image shifted.
You have to look for items in the image and track those items. THIS IS NOT A TRIVIAL TASK!
Look into the AForge[^] library to help with the "computer vision".
|
|
|
|
|
how do i extract specific data in excel into a database
|
|
|
|
|
Okay thanks hey.
I have multiples excel file report. I'm suppose to extract data from those excel file save it in a database so that i can have 1 big report.
so far i am able to browse the file and save data into a dataset. I want to read into data and extract certain data that i need only. im stuck when looping ;P ;P ;P
Dim MyConnection As System.Data.OleDb.OleDbConnection
Dim DtSet As System.Data.DataSet
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
Dim fBrowse As New OpenFileDialog
With fBrowse
.Filter = "Excel files(*.xlsx)|*.xlsx|All files (*.*)|*.*"
.FilterIndex = 1
.Title = "Import data from Excel file"
End With
If fBrowse.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim fname As String
fname = fBrowse.FileName
MyConnection = New System.Data.OleDb.OleDbConnection("Provider= Microsoft.Jet.OLEDB.4.0; Data Source='" & fname & " '; " & "Extended Properties=Excel 8.0;")
MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Apr14$]", MyConnection)
MyCommand.TableMappings.Add("Table", "Billing_report")
DtSet = New System.Data.DataSet
MyCommand.Fill(DtSet)
DataGridView1.DataSource = DtSet.Tables(0)
MyConnection.Close()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(fname)
Dim line As String
line = sr.ReadLine().Trim
Dim n As Integer
Do While line.StartsWith("CNC")
sr.ReadLine()
If line.StartsWith("CNC") Then
line.Substring(10, 11).Length.ToString().Trim()
n += 1
If line.Contains("Circuit no") Then
End If
End If
Loop
End If
|
|
|
|
|
This question answered in Q&A. Please do not post the same question in multiple forums.
|
|
|
|
|
hi i am new to use visual basic. i want to make a clock timer of window application please give me some suggession ?
zubizubi
|
|
|
|
|
|
I have a windows form app that references a library. I want to deploy the app to a different machine and I don't know the name/location for the reference on that machine. Can I edit a config file to include the reference for the new machine? And can you point me to an example, please? I can use either VB6 or VB.net with VS 2010. Thank you for your help.
Bobby
|
|
|
|
|
A "reference" is only valid at compile-time and only works with COM-based and .NET libraries.
If you're using a COM-based library, the registration information in the registry is all that is needed.
If using a .NET library, all you need is the library in the same folder as the .EXE that's using it.
You don't provide this information at runtime.
|
|
|
|
|
Thanks, Dave. And looking at the build action, seems like the library has to be on the development machine, too.
And, do I only need the .tlb file for the target application?
Bobby
modified 28-Oct-14 17:39pm.
|
|
|
|
|
Tlb's are for COM objects ... you may need to register the reference on the other computer... look into regsvr32
Kris
|
|
|
|
|
Thanks, Kris. The library will already be registered on the client. I'll see how it goes.
Bobby
|
|
|
|
|
Hey all!
I am new to VB.Net, but have extensive knowledge in Event/Procedural Programming. I am looking for ideas on a useful application, that can help me gain more understanding of syntax and general procedures. Anyone have an idea of something I can build, as a local application with data storage? I have used Pervasive PSQL database, but have not used MySQL or SQL Server. Pervasive uses PSQL scripting language, which is generally the same as SQL. Maybe something simple that uses flat files for data storage? Just need a direction to start in.
Brian Lefler
Programmer/Analyst
|
|
|
|
|
How about a gas mileage tracker? A table for cars, a table for fill-ups, UI to enter data, etc.
P.S. I was just looking at a page for Pervasive PSQL, but it's unclear what it is. I see no articles about it here on CP. If you have experience, maybe you'd like to write up something about it.
modified 25-Oct-14 16:20pm.
|
|
|
|
|
Great! Thanks. I was trying to figure out how to use an xml document to store the data, but cannot find any examples that use the same class methods to both create, and modify existing documents. I found references to xmlWriter for creating the XML, and xmlDocument to modify existing. I am trying to find something that will give an example to say;
Dim filepath as String = "C:\TestXML"
If File.Exists(filepath) = False) Then
'I need to know best practice to create the file here. What class, methods, etc...
Else
'I need to know best practice to edit the existing file. I mainly need an example of how to add
an additional node name/value pair here.
Endif
Is this something you can help with, or maybe provide an example? I appreciate everything.
|
|
|
|
|
|
Thank you for the article list. Unfortunately, none of them answer the question of, after initial creation of the XML, how can I add additional nodes, and/or edit existing nodes. I am working on a user/password manager.
So, I have a form with textbox/labels representing "ID", "Title", "User", "Pass", "Notes". I also have a "Save" button. On the save button, if the file doesn't exist, create it. (I know how to create the file from scratch.) If the file exists already, how do I traverse to the end of the node set, and add an additional node, with each of the name/value pairs mentioned above. Does anyone have an example of this?
Thank you in advance.
Also, I have a datagridview that I will use to display all existing records. I can tackle this at a later time though. I thought maybe I could use the load sub, to load the existing xml (if it exists) into the dgv. Use the form controls to maintain the values in the dgv. At the unload of the program, delete the xml, and create from scratch, based on values from the dgv. Is that a good method? Below is an example of the xml output I hope to accomplish:
<LIMGRTable>
<Record>
<ID>1</ID>
<Title>Facebook</Title>
<User>MyUserName</User>
<Pass>P@ssword</Pass>
<Notes>My Notes Here</Notes>
</Record>
<Record>
<ID>2</ID>
<Title>Gmail</Title>
<User>soandso@gmail.com</User>
<Pass>P@ssword</Pass>
<Notes>My Notes Again</Notes>
</Record>
</LIMGRTable>
Brian Lefler
|
|
|
|
|
Sorry I don't have an actual example, I just did a search for "XML + VB.NET", you may need to do further searches to find samples that help to answer your question. You should also understand that storing passwords in a text file is not a good thing to do, as anyone can get at them. Passwords should be hashed so that they cannot be read, or even decrypted, before being saved.
|
|
|
|
|
Thank you for your response. I am not actually building an app that I will active store actual passwords in. This is just an attempt to learn more of the VB.Net Language. Thank you again.
|
|
|
|
|
I never did get any good or practice these in the past, I can't even remember what there called
But I know it's a if then else statement.
Just wondering if someone could translate this for me to vb, or help me with the keywords to look up a tutorial on this.
context.Request.Url.Port == 80 ? string.Empty : ":" + context.Request.Url.Port
|
|
|
|