PC Review


Reply
Thread Tools Rate Thread

datarow question

 
 
=?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
Guest
Posts: n/a
 
      3rd Aug 2005
I'm trying to create an instance of a data row, set it's cells, and pass
this to a function for update. Well, so far this is not working a i'm sure
most of you will know why. What's the correct way to do this.
the dataset exists. I guess i need to know how to create the row?
Dim dr As dsUser.usrRow
dr.usrFName = Me.txtFName.Text
dr.usrLName = Me.txtLname.Text
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
 
Reply With Quote
 
 
 
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      4th Aug 2005
Can you show us more code?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
SLODUG - Slovene Developer Users Group www.codezone-si.info

"WebBuilder451" <(E-Mail Removed)> wrote in message
news:92D3775F-34A8-4DC5-9F8B-(E-Mail Removed)...
> I'm trying to create an instance of a data row, set it's cells, and pass
> this to a function for update. Well, so far this is not working a i'm sure
> most of you will know why. What's the correct way to do this.
> the dataset exists. I guess i need to know how to create the row?
> Dim dr As dsUser.usrRow
> dr.usrFName = Me.txtFName.Text
> dr.usrLName = Me.txtLname.Text
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes



 
Reply With Quote
 
=?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?=
Guest
Posts: n/a
 
      4th Aug 2005
yes, of course. (and thanks for replying).
1. dataset dsUser definition is defined via a sqldataadapter in vs.net (it
is not added to the designer) and i'm creating an instance here:
Dim thsusr As UserServices = New UserServices
If IsValid Then
Dim ds As dsUser = New dsUser
Dim dr As DataRow
dr = ds.usr.NewRow
i can get it to work in both of the following ways,
dr(ds.usr.usrCompanyColumn.ColumnName) = Me.txtCompany.Text
dr("usrCompany") = Me.txtCompany.Text

but not this way, but not this way
dr.usrCompany = me.txtcompany.text
thanks
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes


"Miha Markic [MVP C#]" wrote:

> Can you show us more code?
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
> SLODUG - Slovene Developer Users Group www.codezone-si.info
>
> "WebBuilder451" <(E-Mail Removed)> wrote in message
> news:92D3775F-34A8-4DC5-9F8B-(E-Mail Removed)...
> > I'm trying to create an instance of a data row, set it's cells, and pass
> > this to a function for update. Well, so far this is not working a i'm sure
> > most of you will know why. What's the correct way to do this.
> > the dataset exists. I guess i need to know how to create the row?
> > Dim dr As dsUser.usrRow
> > dr.usrFName = Me.txtFName.Text
> > dr.usrLName = Me.txtLname.Text
> > --
> > thanks (as always)
> > some day i''m gona pay this forum back for all the help i''m getting
> > kes

>
>
>

 
Reply With Quote
 
RYoung
Guest
Posts: n/a
 
      5th Aug 2005
try this:

Dim ds As dsUser = New dsUser
Dim dsUser.UserRow userRow = dsUser.NewUserRow
userRow.usrCompany = ....

Basically your getting a strongly typed row from your strongly typed
dataset.

- Ron

"WebBuilder451" <(E-Mail Removed)> wrote in message
news:4B5838C5-21BC-4FD8-856C-(E-Mail Removed)...
> yes, of course. (and thanks for replying).
> 1. dataset dsUser definition is defined via a sqldataadapter in vs.net (it
> is not added to the designer) and i'm creating an instance here:
> Dim thsusr As UserServices = New UserServices
> If IsValid Then
> Dim ds As dsUser = New dsUser
> Dim dr As DataRow
> dr = ds.usr.NewRow
> i can get it to work in both of the following ways,
> dr(ds.usr.usrCompanyColumn.ColumnName) = Me.txtCompany.Text
> dr("usrCompany") = Me.txtCompany.Text
>
> but not this way, but not this way
> dr.usrCompany = me.txtcompany.text
> thanks
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes
>
>
> "Miha Markic [MVP C#]" wrote:
>
>> Can you show us more code?
>>
>> --
>> Miha Markic [MVP C#] - RightHand .NET consulting & development
>> www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>> SLODUG - Slovene Developer Users Group www.codezone-si.info
>>
>> "WebBuilder451" <(E-Mail Removed)> wrote in
>> message
>> news:92D3775F-34A8-4DC5-9F8B-(E-Mail Removed)...
>> > I'm trying to create an instance of a data row, set it's cells, and
>> > pass
>> > this to a function for update. Well, so far this is not working a i'm
>> > sure
>> > most of you will know why. What's the correct way to do this.
>> > the dataset exists. I guess i need to know how to create the row?
>> > Dim dr As dsUser.usrRow
>> > dr.usrFName = Me.txtFName.Text
>> > dr.usrLName = Me.txtLname.Text
>> > --
>> > thanks (as always)
>> > some day i''m gona pay this forum back for all the help i''m getting
>> > kes

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataRow Question Goofy Microsoft ADO .NET 5 3rd Jan 2007 09:36 AM
question about DataRow ALI-R Microsoft ADO .NET 0 15th Nov 2004 08:05 PM
datarow question WStoreyII Microsoft VB .NET 3 22nd Apr 2004 10:24 AM
DataRow Question Microsoft ADO .NET 2 12th Mar 2004 10:20 PM
datarow question Cc Microsoft ADO .NET 0 22nd Sep 2003 03:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:54 AM.