What are you setting the Parameter value to; so it
knows what to update the Db to???
--- Usman Ghani <[EMAIL PROTECTED]> wrote:
> Hi All,
> Code is:
> Dim SubsSQLConnection As SqlConnection
> SubsSQLConnection = New
> SqlConnection(db_connection)
> Dim DASubsEmailCreation As SqlDataAdapter
> Dim dsSubsEmailCreation As DataSet
> DASubsEmailCreation = New
> SqlDataAdapter("select * from subscribers
> where (emailusername is not null or
> len(emailusername) > 0) AND
> MailAcctCreated=0", SubsSQLConnection)
>
> DASubsEmailCreation.UpdateCommand.CommandText =
> ("Update Subscribers
> set MailAcctCreated = 1 where ID = @Original_ID")
>
> DASubsEmailCreation.UpdateCommand.Parameters.Add(New
> System.Data.SqlClient.SqlParameter("@Original_ID",
> System.Data.SqlDbType.Int, 4, "ID"))
>
> DASubsEmailCreation.Fill(dsSubsEmailCreation,
> "subsbribers")
>
> What I am trying to do is that I will read all
> records in a dataset, then
> extract all info I need, after that I wil run the
> updatecommand where a
> particular field Mailacctcreated is set to 1. I am
> getting error
> "Additional information: Object reference not set to
> an instance of an
> object." On line
> DASubsEmailCreation.UpdateCommand.CommandText =
> ("Update
> Subscribers set MailAcctCreated = 1 where ID =
> @Original_ID")"
>
> Pls help me on this.
>
> Thanks.
>
> Usman
>
>
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/