Bir Tablonun Açık Olup Olmadığını Nasıl Anlarız?

Aşağıdaki MapBasic programı adı verilen bir tablonun o an MapInfo’da açık olup olmadığına bakar:

declare sub main
declare function IsTableOpen(ByVal TableName as string) as logical

sub main
  if IsTableOpen("Mahalle") then
    Note "Tablo açık"
  else
    Note "Tablo açık değil"
  end if
end sub

function IsTableOpen(ByVal TableName as string) as logical
  dim i as integer
  IsTableOpen = 0
  for i = 1 to NumTables()
    if TableInfo(i, 1) = TableName then
      IsTableOpen = 1
      exit for
    end if
  next
end function
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: