RB 2.0.5fc2 datacontrol

Damon Pillinger daisychain at iinet.net.au
Fri Jul 15 10:34:12 CDT 2005


Hi All,

dataControl1.database=valdb

Causes the program to crash. Windows error. It did not crash on
2.0.4release

Also causes the same crash when you try to set the database to a
datacontrol in the properties window before you even try to run your
program.

Could someone post a fix quick as I really want to try out what serge
has done.

Thanks
Damon

Example

  dim i,col,j,x as integer
  dim d2 as VRBDataBase
  dim f as folderitem
  dim valdb as VRBDataBase
  col=1
  colpos=-1
  
  ' create a new database
  ts=ticks
  d2=new VRBDataBase
  f=getfolderItem("").child("ValentinaDB.vdb")
  f.delete
  d2.databaseFile=f
  if d2.createDatabaseFile then
    if d2.connect then
      d2.sqlExecute("Create Table test (f1 integer,f2 varchar, f3
date,f4 double,f5 TimeStamp)")
      if d2.error then msgbox "3"+d2.errorMessage
      d2.commit
    else
      msgbox "3Cannot connect"
    end if
  else
    msgbox "3Cannot create"
  end if
  d2.close
  saveend(col)
  
  ' open database
  ts=ticks
  valdb=new VRBDataBase
  valdb.DatabaseFile=getfolderItem("").child("ValentinaDB.vdb")
  if valdb.connect()=true then
    '
  else
    msgbox "BAD"
  end if
  saveend(col)
  
  ' link to datacontrol1
  ts=ticks
  msgbox "AA1"
  dataControl1.database=valdb     <------------------ CRASH HERE
  msgbox "AA2"
  saveend(col)

Best Regards

Damon L. Pillinger
Jensen 2005 by Daisychain
www.daisychain.no-ip.biz
Phone : 03 9532 1220
Fax : 03 9532 1280
stinfo/valentina



More information about the Valentina mailing list