Hi Cor:
I think the problem is almostly resolved. I think the key point should be
the code "Table("XXXX")" and "Table(0)".
And I also removed the code "cmd.ExecuteNonQuery"......I didn't have any
problem running the app, as you said...
Since I didn't give it enough information for those "non-null" fields, the
app is not completed yet...but I don't think it would be a problem.
Thank you for your reply, and your opinions are appreciated very much (and
of great help too). : )
"Cor Ligthert" <(E-Mail Removed)> 在郵件
news:(E-Mail Removed) 中撰寫...
> Hi KKuser,
>
> I forgot an alterenative often made error, however that is easy so
overcome,
> the table name is case sensetive, so there is maybe no table with that
name.
> But when you use the zero index it is with one table always the right one.
> (I added that in the corrections bellow)
>
> However why is that cmd.ExecuteNonQuery, do I not know something, it is
in
> my opinion completly for nothing, only consuming time.
>
> And you should choise or you delete that open or you add that finally
> statement I did show you with the close. This has nothing to do with the
> error, however is bad use of the connections from the SQL server.
>
> I hope this helps?
>
> Cor
>
> See bellow.
> >
> > aconn.Open() ' to delete this is the best in this situation>
> > Try
> > cmd.ExecuteNonQuery() 'What does this do more than consuming
> resources?
> > ada.Fill(ads)
> > drow = ads.Tables(0).NewRow
> > Catch ex as Exception
> > msgbox(ex.ToString)
> > End Try
>
>
>
|