|
It was just a suggestion. ADODB is definitely an "ex-parrot" now; it hasn't been updated since .NET was released, and although it still works, it's not supported.
Using ADODB from a .NET application is going to be significantly slower than using ADO.NET, since your .NET code has to talk to a COM wrapper for ADODB. It also has significantly less features that ADO.NET, and makes many operations harder than they need to be.
If you feel like taking the plunge, there are plenty of articles to get you up to speed. For example:
Migrating from ADO to ADO.NET[^]
Migrating Code and Concepts from ADO "Classic" to ADO.NET[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I love this. It means that there is hope for me at 70. I've been a programmer for decades using 4g OOP, mostly Progress DB system, but never got into VB. But I'm retired now and I'm really trying hard to understand all the .net object calls, there are so many and with so many parameters.
This is really encouraging to me, Ed, Thanks. LOL
|
|
|
|
|
It sounds like your reference has the "Embed Interop Types" property set to "True". Try changing it to "False".
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
That is the "solution" that I've seen from several others, but in VS 2013 there doesn't seem to be any way to do that. I've tried every way I can think of. If you have a suggestion as to how; I will certainly try it.
|
|
|
|
|
The "solution" is not bound to a specific version of the IDE.
Go to the main-menu, choose "View", "Solution Explorer". That shows a list of files in your solution, as well as a node called "References". Open that node, expand it.
Find the reference to the library, select it, press F4. This will bring up the properties window. You can manipulate the mentioned settings there.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Well that sort of worked: As long as I was still in VS 2013 it worked. If I compiled the release version, it didn't. I got a message "could not load...." but this time showing only "culture=neutral" and "PublicKeyToken=null". But the release version still works on the original machine. I think it's demon-possessed. I may have to break down and take your advice and redo a version using ADO instead of ADODB (assuming at my age I have enough time left). I hate that. I might even have to switch to SQL Server, but I haven't tried to use that in a long time. I hate that even worse.
|
|
|
|
|
Ed Barnes wrote: But the release version still works on the original machine. Did you also include the "Copy Local" setting? If those types aren't embedded then it will look for them on the installation somewhere. In the GAC and the local working-directory (often the same folder as the executable), and to make things worse, if the app is compiled for 32-bits it won't be able to load with a 64-bits version of that library. You'd need a copy of that library in your working-folder.
Go the the properties of the reference again, where those settings are. There's also a property called "Path", and that would contain the complete path to the library that is referenced on the development machine. Copy that file into the \debug folder
Ed Barnes wrote: I think it's demon-possessed.
Being in a DLL-Hel is worse than that though.
Ed Barnes wrote: I may have to break down and take your advice and redo a version using ADO
instead of ADODB If you struggle with ADO.NET, simply come back and post the question.
Ed Barnes wrote: I might even have to switch to SQL Server, but I haven't tried to use that in a long time. I hate that even worse. If you want to go that way, there's a relative easy migration; design your tables in MS-Access as usual. There should be an "upsize wizard" in the developers-menu that converts the Access-database to SQL Server format. Once that is done, one can create a new Access database that links to the tables in SQL Server, so one can work with them from Access.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks. 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. IF I were to take the route of moving from ADODB to OleDB, what would be the best (easiest? Most straightforward?) way to go about it, other than recoding the whole program to get rid of ADODB recordsets: Datasets? DataTables? DataAdapter? I've never done an entire program using OleDb that I can remember (of course at my advanced age of 81, what I remember and what is a fact may be completely different)
|
|
|
|
|
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
|
|
|
|