Click here to Skip to main content
15,888,610 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: update problem in datagrid when using SQL Server 2000 as Database Pin
Dave Kreskowiak18-Nov-06 5:24
mveDave Kreskowiak18-Nov-06 5:24 
QuestionI cant a Button control with two images status >> Pin
kindman_nb17-Nov-06 22:53
kindman_nb17-Nov-06 22:53 
AnswerRe: I want a Button control with two images status >> Pin
kindman_nb17-Nov-06 23:06
kindman_nb17-Nov-06 23:06 
AnswerRe: I cant a Button control with two images status >> Pin
Christian Graus17-Nov-06 23:07
protectorChristian Graus17-Nov-06 23:07 
AnswerRe: I cant a Button control with two images status >> Pin
MohammadAmiry17-Nov-06 23:07
MohammadAmiry17-Nov-06 23:07 
Questionvb.Net vs SQL Sever Datatypes Pin
RichardBerry17-Nov-06 21:48
RichardBerry17-Nov-06 21:48 
AnswerRe: vb.Net vs SQL Sever Datatypes Pin
RichardBerry17-Nov-06 22:53
RichardBerry17-Nov-06 22:53 
GeneralRe: vb.Net vs SQL Sever Datatypes Pin
Colin Angus Mackay19-Nov-06 2:39
Colin Angus Mackay19-Nov-06 2:39 
RichardBerry wrote:
I am REALLY scared to insert somthing that may compromise the SQL database since this is our company's Live data...


This may sound totally stupid, but have you considered developing on a COPY of the database? That way you have a development/test database that looks like the live database, but you are free to completely bugger up when accidents happen (and they will happen).


RichardBerry wrote:
DBNull


DBNull represents a null value in a database. The reason it does not return an actual null (or Nothing in VB.NET) is that in certain situations you need to be able to distinguish between nothing being returned and something being returned which happens to be null.

This means that the method you are using is not strictly correct becase the column that is returning DBNull may return some other type when the column contains a value.


RichardBerry wrote:
(it will be a HUGE INSERT Statment for 187 fields...)


Yes, it will. You don't show how you intend to do the INSERT, but may I suggest that you use a parameterised query. That way .NET will handle the conversion between .NET types and the database types. All you have to worry about are the DBNull conversions - and that could be as easy as a method that takes an object and just returns that object unless it is null, in which case it returns DBNull.Value


RichardBerry wrote:
2c) Since the I only need to populate 19 of the 187 fields with actual data, can anyone suggest an elegant way of doing this - perhaps pulling one row from the SQL server, then modifying the 19 fields, then writing that back?)


Do you mean that each row contains pretty much the same data except for the 19 changed columns? Or do you mean that only 19 columns are populated and the rest are all null when the row is initially inserted?

If it is the latter, then may I suggest that you write an INSERT statement to just insert those 19 columns. For example, assume the following table has 20 columns, but only 3 need to be populated on insert:
INSERT TableName(Column1, Column2, Column3) VALUES (@value1, @value2, @value3)


GeneralRe: vb.Net vs SQL Sever Datatypes Pin
RichardBerry19-Nov-06 21:15
RichardBerry19-Nov-06 21:15 
QuestionHow to make multi language interface program ?? Pin
kindman_nb17-Nov-06 20:46
kindman_nb17-Nov-06 20:46 
AnswerRe: How to make multi language interface program ?? Pin
MohammadAmiry17-Nov-06 23:11
MohammadAmiry17-Nov-06 23:11 
GeneralRe: How to make multi language interface program ?? Pin
kindman_nb17-Nov-06 23:48
kindman_nb17-Nov-06 23:48 
QuestionHow to find - Windows Applicatin Bootup Disk? Pin
Anandan k17-Nov-06 20:30
Anandan k17-Nov-06 20:30 
AnswerRe: How to find - Windows Applicatin Bootup Disk? Pin
Dave Kreskowiak18-Nov-06 5:22
mveDave Kreskowiak18-Nov-06 5:22 
AnswerHow to find - System Bootup Disk in Windows Application(XP)? Pin
Anandan k20-Nov-06 23:23
Anandan k20-Nov-06 23:23 
Questionproblem with windows service - msgbox problem Pin
BSRK17-Nov-06 19:08
BSRK17-Nov-06 19:08 
AnswerRe: problem with windows service - msgbox problem Pin
MatrixCoder19-Nov-06 22:09
MatrixCoder19-Nov-06 22:09 
QuestionHow do I delete all files in a folder? Pin
Code Crapper17-Nov-06 14:18
Code Crapper17-Nov-06 14:18 
AnswerRe: How do I delete all files in a folder? Pin
Christian Graus17-Nov-06 15:08
protectorChristian Graus17-Nov-06 15:08 
GeneralRe: How do I delete all files in a folder? Pin
Code Crapper18-Nov-06 12:36
Code Crapper18-Nov-06 12:36 
GeneralRe: How do I delete all files in a folder? Pin
Christian Graus18-Nov-06 12:55
protectorChristian Graus18-Nov-06 12:55 
AnswerRe: How do I delete all files in a folder? Pin
Janani Divya17-Nov-06 15:22
Janani Divya17-Nov-06 15:22 
AnswerRe: How do I delete all files in a folder? Pin
The ANZAC18-Nov-06 13:24
The ANZAC18-Nov-06 13:24 
GeneralRe: How do I delete all files in a folder? Pin
Code Crapper19-Nov-06 2:14
Code Crapper19-Nov-06 2:14 
QuestionHow to open and view TIF in Access Pin
Tech.Wizard17-Nov-06 13:19
Tech.Wizard17-Nov-06 13:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.