Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change Value of a Field
Message
 
 
To
23/07/2009 13:32:57
Joel Whitehead
Ccs Central Computer Services Inc.
Thunder Bay, Ontario, Canada
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01414003
Message ID:
01414004
Views:
56
>Not sure if this is the correct place to post this question, but here goes...
>
>I have a VB 2008 data entry form that uses ADO.NET to link to a SQL Server 2008 Developer's Edition Database. Everything is working fine, but when I add a new record, I would like to programmatically set some fields to certain values. I know where to put the code, but have no idea what line of code lets me change the value of a field. In Visual Foxpro, of course I would type REPLACE fieldname WITH value. How the heck do I do this in VB?

If you want the values to be some default values, then, IMHO, the simplest way would be to set default values in the table (in SQL Server) directly.

Otherwise you need to use UPDATE command in SQL Server to set the values to whatever values you want them to be (or INSERT command for a new record).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform