Click here to Skip to main content
15,895,142 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDLL call from VB6 Pin
Renato Carvalho14-Feb-07 7:56
Renato Carvalho14-Feb-07 7:56 
AnswerRe: DLL call from VB6 Pin
Dave Kreskowiak15-Feb-07 4:28
mveDave Kreskowiak15-Feb-07 4:28 
QuestionArray Stuff Pin
Cedrickdeorange14-Feb-07 6:34
Cedrickdeorange14-Feb-07 6:34 
AnswerRe: Array Stuff Pin
andyharman14-Feb-07 6:46
professionalandyharman14-Feb-07 6:46 
AnswerRe: Array Stuff Pin
Guffa14-Feb-07 6:51
Guffa14-Feb-07 6:51 
AnswerRe: Array Stuff Pin
The ANZAC14-Feb-07 10:29
The ANZAC14-Feb-07 10:29 
QuestionSubscript out of range Pin
TheJudeDude14-Feb-07 6:10
TheJudeDude14-Feb-07 6:10 
QuestionExcel -- Using oledb -- getting dbnull when it's not Pin
nlarson1114-Feb-07 5:18
nlarson1114-Feb-07 5:18 
I have an application that I'm writing to load a spreadsheet, massage the data, and then populate a sql server table. This code works great except the cell for a date field in the spreadsheet is saying it's dbnull but when you look at the spreadsheet and the date is there and valid.

Dim oConn As System.Data.OleDb.OleDbConnection = Nothing
Dim ds As System.Data.DataSet = New System.Data.DataSet, dsRow As Data.DataRow = Nothing
Dim oComm As System.Data.OleDb.OleDbDataAdapter = Nothing, dsCol As Data.DataColumn = Nothing
Dim oAdj As Adjuster = Nothing, oState As New Adjuster.State

Try
oConn = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source='c:\temp\adjusterlicense.xls';" & _
"Extended Properties=Excel 8.0;")

oComm = New System.Data.OleDb.OleDbDataAdapter("select * from [CZ Adjuster Licenses$]", oConn)
oComm.Fill(ds)

For i As Int16 = 8 To ds.Tables(0).Rows.Count - 1
dsRow = ds.Tables(0).Rows(i)
.
.
.

'col 9 = 10/31/07
'col 10 = AJ40008453

For iState As Int16 = 9 To ds.Tables(0).Columns.Count - 1 step 2
'' why is IsDBnull(dsRow(9)) = True when IsDBNull(dsRow(10)) = False
Next
Next

What's interesting is that if I export this file into a comma delimited file, the date is there.

Any help would be greatly appreciated...
Nathan



AnswerRe: Excel -- Using oledb -- getting dbnull when it's not Pin
Marcus J. Smith14-Feb-07 5:40
professionalMarcus J. Smith14-Feb-07 5:40 
GeneralRe: Excel -- Using oledb -- getting dbnull when it's not Pin
nlarson1114-Feb-07 5:54
nlarson1114-Feb-07 5:54 
Questionadding button in dataGrid Pin
costavo14-Feb-07 4:05
costavo14-Feb-07 4:05 
AnswerRe: adding button in dataGrid [modified] Pin
Marcus J. Smith14-Feb-07 4:06
professionalMarcus J. Smith14-Feb-07 4:06 
QuestionHow to extract a zip using vb.net Pin
Navas.M14-Feb-07 3:27
Navas.M14-Feb-07 3:27 
AnswerRe: How to extract a zip using vb.net Pin
andyharman14-Feb-07 6:44
professionalandyharman14-Feb-07 6:44 
QuestionRedundancy seems to be my game to avoid Null Reference and Index Out of Range Exceptions - HELP! Pin
Marcus J. Smith14-Feb-07 2:16
professionalMarcus J. Smith14-Feb-07 2:16 
AnswerRe: Redundancy seems to be my game to avoid Null Reference and Index Out of Range Exceptions - HELP! Pin
Colin Angus Mackay14-Feb-07 5:02
Colin Angus Mackay14-Feb-07 5:02 
Questionhelp for MenuItem for VB.Net Compact Framework Pin
danaelx14-Feb-07 0:37
danaelx14-Feb-07 0:37 
Questionwhat is handle in .net Pin
saravanaks13-Feb-07 23:59
saravanaks13-Feb-07 23:59 
AnswerRe: what is handle in .net Pin
Christian Graus14-Feb-07 0:35
protectorChristian Graus14-Feb-07 0:35 
AnswerRe: what is handle in .net Pin
Thomas Stockwell15-Feb-07 14:26
professionalThomas Stockwell15-Feb-07 14:26 
Questionhow could I use the values of the dataGrid Pin
costavo13-Feb-07 23:52
costavo13-Feb-07 23:52 
AnswerRe: how could I use the values of the dataGrid Pin
Marcus J. Smith14-Feb-07 2:09
professionalMarcus J. Smith14-Feb-07 2:09 
AnswerRe: how could I use the values of the dataGrid Pin
Rahul Appu14-Feb-07 2:12
Rahul Appu14-Feb-07 2:12 
GeneralRe: how could I use the values of the dataGrid Pin
costavo14-Feb-07 2:19
costavo14-Feb-07 2:19 
QuestionRe: how could I use the values of the dataGrid Pin
costavo14-Feb-07 2:32
costavo14-Feb-07 2:32 

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.