|
Hi
First of all, a language compiler is very sensitive to spelling. Lucky for you, VB.NET is not case sensitive, but you still need to spell things correctly.
Secondly, if you're replying to a post below, you should press 'reply', then the person who answered you will get an email, and the boards won't become an unreadable mess. You may have missed it, but these boards support threading, where you can see exactly who has replied to who.
Having read your question below, I'd have to suggest that you obviously are not at a point where you should be trying to do anything remotely this complex. The world is full of people who try to start programming by writing useful applications, most of them never write one thing worth looking at. If you want to learn, start simple, and build from there. If you don't know 'where to put the code', then you should not be using it, or trying to impliment what you're trying at the moment. You should write a few console apps, such as a basic calculator. Then start playing with some WinForms and learn how that sits on top of VB.NET. Then, when you've got enough of an understanding to be able to use the help that people offer you here, you can start working on something more complex, and ask questions as you get stuck.
Of course, you can ask more basic questions as you work through some more basic examples, also. We're here to help, but you need to do some work too
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi everyone, I was wondering if anyone knows what the syntax would be to access a microsoft access database query and populate a dataadapter/dataset with the resulting table? Thank you
eatwork
|
|
|
|
|
Search msdn for dataset class, that should get you started.
|
|
|
|
|
Hi KaptinKrunch,
Thanks for the reply. I did the search in msdn for the dataset class and could not find the syntax to populate a dataset based on a query created within the ms access database. All of the articles I read were populating the dataset based on a user defined Select statement within their code. would you be able to post the actual url where you found this information? thank you.
eatwork
|
|
|
|
|
Dim MyConnectionString as String = "Jet OLEDB:Registry Path=;User ID=Admin;Jet OLEDB:System database=;Data Source=""C:\MyDatabase.mdb"";Provider=""Microsoft.Jet.OLEDB.4.0"";Persist Security Info=False;Jet OLEDB:Global Partial Bulk Ops=2;Mode=ReadWrite;Extended Properties="";COUNTRY=0;CP=1252;LANGID=0x0409"""
Dim MyConnection As New OleDbConnection(MyConnectionString)
Dim MyAdapter As New OleDbDataAdapter
Dim MyDataTable as New DataTable
MyAdapter.SelectCommand = New OleDbCommand("select * from MyTable", myconnection)
MyAdapter.Fill(MyDataTable)
Read a book on the subject! There is so much to learn.
|
|
|
|
|
Hi dptalt,
Thank you for your response. I am able to access the tables in the database, but my question was directed towards opening queries created within the access database without using the "select * from mytable". Or does your message mean that I can use a "select * from myquery" to return the results from a query? Thank you.
Eg. I have a query named qryWheelRatesList, the query utilizes another query within it and I was wondering if I need to combine the two select statements together to retrieve results, or if there was syntax that would allow me to open the query itself and return the values within the query so I don't have to create a long and complicated select statement. Thank you.
eatwork
|
|
|
|
|
Hi dptalt and kaptinKrunch
I have found the solution to my problem. It was because because I had split the database and the queries were not included on the database that we were trying to access. THank you for all of your help.
eatwork
|
|
|
|
|
Ok good. But you can do this too:
MyAdapter.SelectCommand = New OleDbCommand("select * from qryWheelRatesList", myconnection)
|
|
|
|
|
Hi guys,
I've been searching this site for a auto updater that connects to internet and dowloads a update if it is avaible and i couldn't find one.
So i would really appriciate if anyone could help me .
Thanks.
|
|
|
|
|
There should be one also here, but AFAIK with VS2005 and FW2.0 this "function" is embedded so you don't need an external tool anymore.
|
|
|
|
|
I'd really like to use SYSTEM.CODEDOM.COMPILER or SYSTEM.REFLECTION.EMIT to create assemblies for the compact framework from the regular framework. In other words, dynamically compile code on a PC to send to a handheld and run.
I can't seem to find any info about this. I feel like I could bootstrap into it if I could just get an example or two.
This
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_evtuv/html/etconsimilaritieswithnetframework.asp
seems to suggest I would need to compile specifically for the CF if I want my code to run there, and I confirmed that a simple form compiled in the full framework will choke if I try to run it in the CF.
Does anybody have any pointers or suggestions? Anyplace I could look further?
|
|
|
|
|
If I understand your qeustion correctly, you won't find any examples of this. This is because the CF is a subset of the full framework. Form example, compare the Form classes, or pretty much any of them, in the CF and Full Frameworks and you'll notice that the CF classes don't support nearly the number of properties and methods that the full version does. There are also entire classes that are not supported on the CF version.
There is no tool that can take a full version application and "strip it down" to work on the CF version. You have to re-compile the application, and in most cases re-write code, under the CF version in order to get it to work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you for taking the time to reply.
CODEDOM and EMIT are functionality in the full framework used to compile new assemblies. I would need to write code for the compact framework dynamically and then feed it into one of these classes. The classes would create the new DLL or EXE for the compact framework, and then I could send the new files to a device to be called by the reflection class. I was looking for an example of the compilation part.
I think the trick is selecting the correct libraries to compile with, but I'd really like to see an example instead of wasting a lot of time trying to figure it out from scratch.
|
|
|
|
|
Well, you've still got a huge problem. The code that comes out of CODEDOM in the Full Framework is compiled against the FULL FRAMEWORK! This code wont run on the CF. Ever notice that a Form in the CF doesn't support a Window Handle? If you use the Full Framework's CODEDOM, it won't compile against the CF and you can't tell it which libraries to use.
Using the CodeDOM[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am using DataGrid control to save some records.Is there anymethod by which i can change the RecordCount by which i can read the record of my choice.I tried to assign some value to recordcount but it got runtime error telling that its read-only variable.Somebody please help me with this.
Thanks in advance,
Sushma
|
|
|
|
|
Are you sure your looking at the right property. RecordCount should and is Read-Only for a reason.
What are you attempting to accomplish by changing the RecordCount property?
|
|
|
|
|
I need to translate a VBA excel marco into vbscrip to run it automaticaly when I copy the file with a program called VisaVersa.
Is there a tool that can do the trick ?
|
|
|
|
|
Hi all,
I'll try to explain what I want to do. I'm starting to learn about arrays and I'm trying (and failing all day) to be able to create a list in a dropdown menu of filmtypes: "Comedy" "Thriller etc.
When I select one of them "Comedy" for example I want that to appear in the list below.
I've attached the code I've written so far:
hope someone can help.
thanks,
Chris
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With ComboBoxSelectType.Items
.Add("Comedy")
.Add("Thriller")
.Add("Horror")
.Add("Animation")
End With
End Sub
Private Sub ComboBoxSelectType_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBoxSelectType.SelectedValueChanged
Dim Comedy(5) As String
Comedy(0) = "The Best of Jasper Carrot"
Comedy(1) = "Goldmember"
Comedy(2) = "The Man Who Sued God"
Comedy(3) = "The Life of Brian"
Comedy(4) = "24 Carrot Gold"
Comedy(5) = "Peter Kay"
If ComboBoxSelectType.SelectedItem Is Comedy Then
ListBoxAvailableDVDs. = Comedy
End If
thanks,
Chris
|
|
|
|
|
First, the following line does not make sense.
chrischik wrote: If ComboBoxSelectType.SelectedItem Is Comedy Then
Keyword "Is" is used to check if 2 references refer to the same object. In this case, they're 2 completely different classes which will cause the above code to always evaluate False.
You see SelectedItem will return a String reference because that's what you added into the ComboBox in Form_Load. Comedy is an Array reference.
Second, I don't think you need to use an array at all in this case. It looks like you just want to add the selected ComboBox string into your ListBox. So, why not do this?
Private Sub ComboBoxSelectType_SelectedValueChanged(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles ComboBoxSelectType.SelectedValueChanged
If (ComboBoxSelectType.SelectedIndex >= 0) Then
ListBoxAvailableDVDs.Items.Add(ComboBoxSelectType.SelectedItem)
End If
End Sub
|
|
|
|
|
If you are looking for the "error" then the line:
If ComboBoxSelectType.SelectedItem Is Comedy Then
has to be changed in one of those:
If ComboBoxSelectType.Text = "Comedy" Then
or
If ComboBoxSelectType.SelectedIndex = nn then ' (where nn is the array index)
Also I don't understand this line (and surely doesn't compile):
ListBoxAvailableDVDs. = Comedy
If you want a suggestion you can also go for:
select case ComboBoxSelectType.Text<br />
case "Comedy"<br />
' Code to handle this case<br />
case "Thriller"<br />
' Code for thriller<br />
...<br />
end select
|
|
|
|
|
Oops. Good catch Briga. I answered this way to quickly and forgot the DVD titles under Comedy.
|
|
|
|
|
how can I make a dictionary that by writing any word goes and stand on that words? for example I want to find book meaning,first I write b,THen o,so I want my words stand on bo,then any words that have boo,finally book...
|
|
|
|
|
|
hi all
I need to scrool in datagrid does some one now how to do it in vb.net
thanks
asa
|
|
|
|
|
Hey everyone
I am new to VB. I need to do a small project where I need to make a real-time graph from the data in a database. What I need to do is to query the database every minute to count the number of records present there and plot the difference of the new count and the previous count on Y axis and the time elapsed on X-axis.
Thanks
|
|
|
|