Click here to Skip to main content
15,913,854 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Navigation Panel Pin
Mekong River13-Feb-06 14:46
Mekong River13-Feb-06 14:46 
Questionconvert date to string Pin
ssfargade13-Feb-06 10:17
ssfargade13-Feb-06 10:17 
AnswerRe: convert date to string Pin
Joshua Quick13-Feb-06 11:17
Joshua Quick13-Feb-06 11:17 
AnswerRe: convert date to string Pin
eagertolearn14-Feb-06 7:00
eagertolearn14-Feb-06 7:00 
Questiondatagrid visualization problem Pin
Marc Soleda13-Feb-06 9:17
Marc Soleda13-Feb-06 9:17 
AnswerRe: datagrid visualization problem Pin
Marc Soleda13-Feb-06 9:47
Marc Soleda13-Feb-06 9:47 
QuestionVB.NET Windows Form Reading Excel dumping data into SQL server Pin
culbysl13-Feb-06 9:15
culbysl13-Feb-06 9:15 
AnswerRe: VB.NET Windows Form Reading Excel dumping data into SQL server Pin
Dave Kreskowiak14-Feb-06 8:28
mveDave Kreskowiak14-Feb-06 8:28 
culbysl wrote:
I can open the excel file and begins to read but when I come across an empty file I get a dbNull error.


When you come acrossed an empty Excel FILE?? Or Cell??

If it's an empty file, you can just capture the error in a Try/Catch block and move on:
' Setup connection stuff...
' Setup your loop, enumerating your files...
Try
    ' Open the connection
    ' Execute the SELECT statement
Catch ex As Exception
    ' Handle the emtpy file problem here...
Finally
    If connection is not closed then
        Close connection
End Try
 
' Loop around to process the next file...

culbysl wrote:
Wrong number of arguments used with function in query expression 'IsNull('Column Name', '')'.


You can't use Excel functions in the SELECT statement because Excel is not doing the processing here. You should either stick with the * or specify the columns you're actually goint to use.

Now, if your code is bombing try to use a DBNull value from a cell, then your code has to check to see if that value is DBNull before trying to use it.




RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

QuestionGenerate PDF report Pin
eagertolearn13-Feb-06 7:54
eagertolearn13-Feb-06 7:54 
AnswerRe: Generate PDF report Pin
malharone13-Feb-06 8:28
malharone13-Feb-06 8:28 
GeneralRe: Generate PDF report Pin
eagertolearn14-Feb-06 6:58
eagertolearn14-Feb-06 6:58 
AnswerRe: Generate PDF report Pin
Mekong River13-Feb-06 14:50
Mekong River13-Feb-06 14:50 
QuestionICustomFormatter and IFormattable Pin
Jason McBurney13-Feb-06 5:36
Jason McBurney13-Feb-06 5:36 
AnswerRe: ICustomFormatter and IFormattable Pin
Dave Kreskowiak14-Feb-06 8:17
mveDave Kreskowiak14-Feb-06 8:17 
Questionabout menu?can anybody help me? Pin
flashmemory13-Feb-06 5:34
flashmemory13-Feb-06 5:34 
AnswerRe: about menu?can anybody help me? Pin
malharone13-Feb-06 7:26
malharone13-Feb-06 7:26 
Questionreading third party Snap-in information in MMC programatically Pin
krompo13-Feb-06 4:34
krompo13-Feb-06 4:34 
Question[datagrid/winforms] create column with custom control in every row Pin
Y3PP3R13-Feb-06 4:14
Y3PP3R13-Feb-06 4:14 
QuestionHow to add application to Windows Scheduler? Pin
.NetRams13-Feb-06 1:32
.NetRams13-Feb-06 1:32 
AnswerRe: How to add application to Windows Scheduler? Pin
Tim Carmichael13-Feb-06 3:14
Tim Carmichael13-Feb-06 3:14 
AnswerRe: How to add application to Windows Scheduler? Pin
Dave Kreskowiak14-Feb-06 7:56
mveDave Kreskowiak14-Feb-06 7:56 
QuestionRDA Help... Pin
UniBond13-Feb-06 1:22
UniBond13-Feb-06 1:22 
QuestionScheduler Application in VB.Net. Pin
.NetRams12-Feb-06 23:45
.NetRams12-Feb-06 23:45 
AnswerRe: Scheduler Application in VB.Net. Pin
mgilmore13-Feb-06 13:43
mgilmore13-Feb-06 13:43 
QuestionHow to upload webpages to the site Pin
Sgn_Flex12-Feb-06 22:27
Sgn_Flex12-Feb-06 22:27 

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.