Re: loading data from spread sheet to oracle database
From: ravinookala (ravinookala.11fys4_at_excelforum-nospam.com)
Date: 02/11/04
- Next message: Cameron: "Reflecting all Work*** Names onto one Work***."
- Previous message: Debra Dalgleish: "Re: smart tags in Excel 2002"
- In reply to: onedaywhen: "Re: loading data from spread *** to oracle database"
- Next in thread: ravinookala: "Re: loading data from spread *** to oracle database"
- Reply: ravinookala: "Re: loading data from spread *** to oracle database"
- Reply: onedaywhen: "Re: loading data from spread *** to oracle database"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Feb 2004 21:01:18 -0600
Hi
Thank you very much for your help.
It is not necessary to select the field names in the record set.
If it is so, my programme will become hardcoded.
I have done it dynamic as under and working fine.
intFieldsCount = RS.Fields.Count
v_rowcount = Range("A1").CurrentRegion.Rows.Count - 1
With RS
For i = 0 To v_rowcount - 1
RS.AddNew
For j = 0 To intFieldsCount - 1
If IsEmpty(ActiveCell.Offset(0, j)) = True Then
.Fields(j).Value = Null
Else
.Fields(j).Value = Trim(ActiveCell.Offset(0, j))
End If
On Error Resume Next
Next j
RS.Update
ActiveCell.Offset(1, 0).Select
Next i
End With
Ravi Nookala
--- Message posted from http://www.ExcelForum.com/
- Next message: Cameron: "Reflecting all Work*** Names onto one Work***."
- Previous message: Debra Dalgleish: "Re: smart tags in Excel 2002"
- In reply to: onedaywhen: "Re: loading data from spread *** to oracle database"
- Next in thread: ravinookala: "Re: loading data from spread *** to oracle database"
- Reply: ravinookala: "Re: loading data from spread *** to oracle database"
- Reply: onedaywhen: "Re: loading data from spread *** to oracle database"
- Messages sorted by: [ date ] [ thread ]