Creating on-the-fly-table
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon May 16 17:43:50 CDT 2005
On 5/16/05 4:39 PM, "Charles Cohen" <rwc1717 at shaw.ca> wrote:
> I coded it as follows
>
> dim v as VTable
> dim vf as VField
> dim s() as String
> dim rsxml as VCursor
>
> v = new MyADB.CreateTable("xmlTmp",EVTableKind.kTblTemporary)
> vf = v.CreateStringField("DescriptA", 100)
> vf = v.CreateStringField("HighA",15)
> vf = v.CreateStringField("LowA",15)
> vf = v.CreateStringField("TargA",15)
> vf = v.CreateStringField("DivdA",15)
> vf = v.CreateStringField("PerfA",20)
> vf = v.CreateStringField("equityIDA",25,EVFlag.fIndexed)
> vf = v.CreateStringField("BuyA",15)
> for i = 0 to ArchLB.Listcount-1
> if ArchLB.cellcheck(i,1) then
> rs = Nil
> rs = aDb.SQLSelect("select * from aEquity where equityIDA =
> '"+archLB.cell(i,2)+"'",EVCursorLocation.kClientSide)
> s.append rs.Field("DescriptA").GetString()
> s.append rs.Field("HighA").GetString()
> s.append rs.Field("LowA").GetString()
> s.append rs.Field("TargA").GetString()
> s.append rs.Field("DivdA").GetString()
> s.append rs.Field("BuyA").GetString()
> s.append rs.Field("PerfA").GetString()
> s.append rs.Field("equityIDA").GetString()
> v.SetBlank()
> v.StringField("DescriptA").SetString(s(0))
> v.StringField("DescriptA").Value = s(0)
> v.StringField("HighA").Value = s(1)
> v.StringField("LowA").Value = s(2)
> v.StringField("TargA").Value = s(3)
> v.StringField("DivdA").Value = s(4)
> v.StringField("BuyA").Value = s(5)
> v.StringField("PerfA").Value = s(6)
> v.StringField("equityIDA").Value = s(7)
> call v.Addrecord()
> //rsxml = aDB.SqlSelect("Select * from xmlTmp WHERE
> false",EVCursorLocation.kServerSide, EVLockType.kReadWrite)
>
> //rsxml.StringField("DescriptA").Value = s(0)
> //rsxml.StringField("HighA").Value = s(1)
> //rsxml.StringField("LowA").Value = s(2)
> //rsxml.StringField("TargA").Value = s(3)
> //rsxml.StringField("DivdA").Value = s(4)
> //rsxml.StringField("BuyA").Value = s(5)
> //rsxml.StringField("PerfA").Value = s(6)
> //rsxml.StringField("equityIDA").Value = s(7)
> //call rsxml.Addrecord()
> v.flush
> redim s(7)
> rs = Nil
> end if
> next
> fiXML = GetFolderItem("charts.xml")
> indumpformat = true
> v.Dump( fiXML, 2, 2,indumpformat)
> MyADB.DropTable("xmlTmp")
> msgbox "XML File"
>
> I retreive the record but I get NilObjectEception for any of attempts
> at writing the data to the new table whether trying to use a cursor or
> trying to use a table, as well as, the MyADB doesn't drop it when I
> ask.
>
> My first attempt at creating the xml file, I tried to remove the
> records I didn't want from the already existing tables...dumping the
> balance to the xml file but not flushing....
> The records got deleted anyways?
Does this code show problem on small db also ?
If yes then can you send me project for debugging ?
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list