|
I get the feeling that your going through a tutorial written for VB.NET 2003 and your using VB.NET 2005, right?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
First, you have to be editing the form in the designer, not the code.
Then, if you open the ToolBox, find the Data section (tab). It'll be in there.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Here is what I see in the Data tab of the tool box:
Pointer
Dataset
SqlDataAdapter
SqlConnection
SqlCommand
Dataview
the other stuff is for OLE and Oracle
There is no object that says dataReader
|
|
|
|
|
Sorry, I don't have 2003 in front of me anymore.
You might see OleDbDataReader instead. The organization of all these classes is pretty simple.
Anything that starts with Sql...... is for a database stored on a MS Sql Server.
Anything that starts with OleDb.... is for a database stored in a Jet database, otherwise known as MS Access.
If you're using an OleDbConnection object, use an OleDbDataReader to go with it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
kenn_rosie wrote: I am doing a VB.net tutorial and they ask me to pull in a data reader from the toolbox.
Don't tutorials teach people how to actually write code anymore.
A Data Readers are just classes. You can get different types of data reader depending on your database or you can get some generic types like OdbcDataReader[^]or OleDbDataReader[^] or specific types like SqlDataReader[^] or OracleDataReader[^]
kenn_rosie wrote: I assume it has something to do with the sqldataadapter?
The data adapter classes use their data reader counterpart in order to extract the information from the database. All data extraction from the database comes in through a data reader. The Data Adapter justs adds an addional layer of abstraction away from the database in order to hide the details from the implementor (i.e. the developer)
kenn_rosie wrote: Where do I load this datareader?
For example (assuming you already have a command object called myCommand):
Dim myDataReader As OleDbDataReader
myDataReader = myCommand.ExecuteDataReader()
Does this help?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I am still confused.... do I need to open the SqlDataAdapter from the tool box and the dataReader is part of that?
Probably sounds silly to you but this is my first shot at VB.net
|
|
|
|
|
kenn_rosie wrote: do I need to open the SqlDataAdapter from the tool box and the dataReader is part of that?
While the SqlDataAdapter uses an SqlDataReader internally, you never get to see it. What happens is that the data adapter:
Opens the connection
Executes the command getting a data reader
Uses the data reader to build the DataSet
Closes the Data Reader
Closes the connection (but, only if it was closed to start with)
Returns the DataSet
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Maybe this will help see what I mhave done so far:
I placed a DataGrid on an ASP.NET Web page added the following code:
<asp:datagrid runat="server" id="KennDataGrid">
I placed the code in the HTML form as follows:
<asp:datagrid runat="server" id="KennDataGrid">
Here the id="KennDataGrid will be the name of the DataGrid used when referring to it in our server-side code.
I know I needed to bind data to the DataGrid.
The tutorial said:T
The first thing we need to do is to grab a DataReader containing some database data.
This is all I have done on the project so far. Where I am lost is "grabbing this datareader"they are talking about
|
|
|
|
|
kenn_rosie wrote: Where I am lost is "grabbing this datareader"they are talking about
Probably just a very informal way of saying use a data reader - but I'm surprised they don't show you what they mean.
Unfortunately, I cannot help with binding the data to the data grid - I didn't like them in .NET 1.1 (I felt they promoted poor coding practices by too tightly coupling the data layer to the GUI layer). They are much improved in .NET 2.0 but I haven't had a chance to look at them.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I want to get the system contextmenu of any type files when i right click this type file in listview control in vb.net,the effect is like you right click the file in Windows folder,but i cann't do that.
Anyone can help me?
|
|
|
|
|
hi,
glitch occurs when i try drag that dialog to another when its subform is running. simulation is
1. run the program , click the command buton in form 1
2. click ok button in dialog
3. quickly drag the dialog, u can see the replica of its own image thro' the place whereever u drag until that loop for its subforms runs after that it is normal.
can anybody give ideas to solve this problem.
www.tamilselvan.zoomshare.com
|
|
|
|
|
dialog
------
------
Private Sub Form_Load()
End Sub
Private Sub OKButton_Click()
Load Form2
Form2.Show vbModeless
'DoEvents
For i = 1 To 300
For j = 1 To 1000
'DoEvents
Dialog.AutoRedraw = True
Form2.Caption = "hello"
Next j
Next i
End Sub
form 1
------
------
Private Sub Command1_Click()
Load Dialog
'Me.Hide
Dialog.Show vbModeless
'DoEvents
dodummy
End Sub
Private Sub dodummy()
End Sub
form 2
------
------
Private Sub Form_Activate()
fill
End Sub
Private Sub fill()
For i = 1 To 100
For j = 1 To 1000
Form2.FillColor = 0
Next j
Next i
End Sub
www.tamilselvan.zoomshare.com
|
|
|
|
|
There is no solution to this problem. Your form2 won't redraw itself until that Fill loop in it is done.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
It's a hack, but how about doing the painting phase by phase in response to a timer tick? Yes, the painting would be slower, but the app would be more responsive because the message pump can process some messages between timer ticks.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I think he's just writing a little test app for this. I have no idea if he's trying to really make anything out of this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
yes its really matters, actaully i simulated this problem from my project. suggestion senthil kumar is worth, but i want permanent solution so that it can be fast and feasible for massive inputs.
www.tamilselvan.zoomshare.com
|
|
|
|
|
Guys I need some help,
I have a text files xxxyyy.txt which is semi-column delimetted with the first row being the header. How do I create an sql table with the contants of the file.
Is there an article for this maybe...?
|
|
|
|
|
You could use DTS - It would be the most effective solution. It would also be the quickest to set up.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Colin thanks, but because I am new in all this can you elaborate
a bit more on what you mean with DTS
?
|
|
|
|
|
This is IMO the easiest way.
Open Enterprise Manager and goto your database's "Tables" section
Right-Click in the RHS panel and select All Tasks>Import Data...
Follow the wizard setting "Column Delimiter" and "First Row has Column Names" appropriately
ta.da.
some hints:
You can name the table, or select an existing one on the 3rd from last step
You can save your dts package in SQL Server on the second from last step - it can then be viewed/edited from Data Transformation Services/Local Packages in Enterprise Manager
|
|
|
|
|
Here is an overview: Data Transformation Services in SQL Server 2000[^]
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Thanks guys, have been very helpful,
Just have to figure out how to do this in code from vb,
|
|
|
|
|
HI All!
when i try to debug my web service breakpoints show question marks..and while tracing control can't reach to the ?-marked breakpoints in vb.net2003 any body can help???
Thanks in advance,
Sufyan,
|
|
|
|
|
Looking for this[^]?
If you follow it, it pretty much gives you the checklist for making sure you have met the requirements for debugging a web service.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|