|
Wow.
Take a step back and do some reading. If they are all in the same table, then you only need one reader, each row will contain all the values you need, assuming you select them.
Christian Graus - C++ MVP
|
|
|
|
|
DO u have any site where by i am able to read the information i like. I am quite a noob to coding. Or do u have any sample code on that?
|
|
|
|
|
You're on a site full of articles. But, if you're really that new, then you really need to take a step back, and work through a book or two.
http://msdn.microsoft.com [^] is full of info as well, but this [^]is the best way to search it, use site:msdn.microsoft.com in your search string.
Christian Graus - C++ MVP
|
|
|
|
|
What kind of objects are you using? How are the objects related?
It looks kind of like you are reading from four tables simultaneously. Why would you do that? Can't you combine them into one result when you query the database?
---
b { font-weight: normal; }
|
|
|
|
|
assuming you've a data control
data1.refresh
data1.recordsource = "select * from yourdb"
data1.recordset.movefirst
do while not data1.recordset.eof
strFirstField = data1.recordset.fields("Field1").value
strSecondField = data1.recordset.fields("Field2").value
data1.recordset.movenext
loop
|
|
|
|
|
i dun understand ur question. Ya, i need to read 4 diff rows from the same table therefore i use 4 reader. I do not know any shorter way to combine in one result. Any suggestion on tis error u can provide me with??
|
|
|
|
|
Subjugate wrote: Ya, i need to read 4 diff rows from the same table therefore i use 4 reader
You need four rows, or four columns ? If you need four rows, then you need to do a select that requests those four. If you need four columns, your select statement should request those four.
Christian Graus - C++ MVP
|
|
|
|
|
He's using four readers as he needs four columns from one table. I suspect that's the core issue.
Christian Graus - C++ MVP
|
|
|
|
|
Ya.. sori for my explanation error i need 4 columns from the same table. U mean i just need to use the SELECT sql to retrieve my 4 columns?
|
|
|
|
|
Yes, if you do a Select *, then all four columns will be read. dTable3.Rows(0)("Frequency") is reading the Frequency column, that's how you specify any column on the one reader.
Christian Graus - C++ MVP
|
|
|
|
|
oh ok... i understand wat u mean already.. thanks a lot u guys help... Learn sumthing new today..
|
|
|
|
|
All,
Trying to serialize a data table for file storage in a simple window application. Is this possible and if it is can anyone point me in the direction of an example or help explain how I would go about coding it. I basically want the user to generate the table and be able to save and load it at a later stage.
The xml file will contain the data table info and further information not linked to the table.
I've only started looking at XML and while I believe I have grasped the basic concept there is a lot of info out there that is misleading.
Thanks for any help you can give.
|
|
|
|
|
look into these 2 methods
datatable.ReadXml()
datatable.WriteXml()
|
|
|
|
|
I have two combo boxes that have a parent child relationship. So when comboA changes comboB uses a new DataSource and the drop down values are updated. This works correctly, but now I am databinding the selectedvalues of each combo box to an object. Sometimes the databinding works correctly, meaning comboA is bound first then comboB updates with a new list and comboB's value is bound correctly. Sometimes comboB is bound before A which causes B to be empty after A populates itself.
How do you control the order in which values are bound to their controls? I have tried changing the order of the combo boxes on the form, but no luck. Anyone have any ideas?
Thanks
Mike Lasseter
|
|
|
|
|
mr_lasseter wrote: How do you control the order in which values are bound to their controls?
By doing it in code instead of via the designer.
|
|
|
|
|
Yeah, that's what I ended up doing, but no control through the designer?
Mike Lasseter
|
|
|
|
|
I wouldn't expect so. The designer will always be a set of shortcuts for people who prefer not to have to write code. It can never be as flexible as actual programming.
|
|
|
|
|
Hello,
Ok i have a question first on deployment. I have created a voice recording program using the directx.capture code i found on this site and wat im trying to do is that i want to add the directx setup along with the setup of my project. Wat exactly i want is that, when the user installs my project, it is also detected if directx is installed in the system and if not, the directx setup will automatically start and it will be installed.
How do i go about doing this???
Another thing i wanted to know is how its possible to determine if directx is installed when the code is running? like on a click on a button?
hope to get a reply soon
|
|
|
|
|
You can work out if DX is installed via the registry. You have to ship the DX installer with your app, there's no merge module.
|
|
|
|
|
Help, Im going insane.
Im using VS.Net 2005 and have come across a problem where properties I set dont seem to take affect.
For example:
I have a vb.net form, I set its size to 330, 500. Save the form. Close and reopen it, and the size has changed to 326, 497.
Ive done it 20 times. Even rebooted several times.
The form isnt locked.
The file is writeable.
Infact, the actual size in the designer does even match, in there it says 324, 469.
So I manually change that value to 330, 500. Save, close and reopen. Now my form has grown to 332, 528!!
Here's what the designer says:
<br />
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)<br />
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font<br />
Me.BackColor = System.Drawing.SystemColors.Control<br />
Me.ClientSize = New System.Drawing.Size(324, 469)<br />
As you can see, nothing fancy at all.
I changed the colour to bright red. saved, closed, reopened. The form was still bright red.
Has anyone ever seen this happen before?
Not happening anywhere else, other forms seem to be fine.
However it has reminded me of a problem last week, where I had a splitter on a form, which I moved, and later noticed that it had repositioned itself.
Im lost. And slowly going crazy! Please help!!
Mark
|
|
|
|
|
Do you set it in the designer, or in code ? If in code, before or after the initialiseComponent call ?
|
|
|
|
|
No, in designer.
Literally just opening a form in designer mode, changing the size in the properties window.
Saving and closing.
When I reopen it, the size has reverted back.
|
|
|
|
|
If i have a label on a form, how can i code it so the background colour is transparrant @ runtime ?
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
Me.Label1.BackColor = System.Drawing.Color.Transparent
Tip:
whenever you change a controls properties from their default in the design mode, the change is added to the form's designer for that control. so you if you put a label on your form and change it's background color, go look at the form designer and see how the ide did that. then use the same command at runtime.
Nathan
-- modified at 13:52 Tuesday 14th November, 2006
|
|
|
|
|
Hi Friend
I really appreciate your assistance and i really like your Golden tip. Gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooood work
Regards
Syed Shahid Hussain
|
|
|
|