New topic: 

RB2010R2, SQLExecute function does not "appear" in my IDE!

<http://forums.realsoftware.com/viewtopic.php?t=34020>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        IMIXMMM          Post subject: RB2010R2, SQLExecute function 
does not "appear" in my IDE!Posted: Sun May 30, 2010 12:20 am                   
      
Joined: Thu Oct 26, 2006 4:49 am
Posts: 118                Hi,

I have been scratching my head to see why my code does not work, and have just 
discovered that i cannot create a database file because the "SQLExecute" 
function does not appear in myIDE? The "SQLSelect" function does?

I have the current version of RB Studio professional 2010R2, MAC
I have defined a property in my app for the db as REAL SQLDatabase

The other strange thing is that in another existing project I can see the 
"SQLExecute" statement appear in the IDE

Code:  
  App.db = New REALSQLdatabase
  App.db.DatabaseFile = GetFolderItem(vDatabaseFile)
  
  IF App.db.DatabaseFile.exists THEN
  
  IF  App.db.Connect() = FALSE THEN
  
  MsgBox "Database Error: Could Not Connect!" + STR(App.db.ErrorCode) + 
EndOfLine + EndOfLine + App.db.ErrorMessage
  
  QUIT
  
  END IF
  
  ELSE
  
  MsgBox "Database file does not exist! Creating a new one!"
  
  DIM F AS FolderItem
  F = New FolderItem(vDatabaseFile)
  App.db.DatabaseFile = F
  
  IF App.db.CreateDatabaseFile THEN
  
  
   db.SQLExecute "Create Table Companies ("+_
  "RecordID INTEGER NOT NULL PRIMARY KEY,"+_
  "CompanyType VARCHAR,"+_
  "DateAdded VARCHAR,"+_
  "CompanyName VARCHAR,"+_
  "ABN VARCHAR,"+_
  "ACN VARCHAR,"+_
  "Website VARCHAR,"+_
  "Bank VARCHAR,"+_
  "Branch VARCHAR,"+_
  "BSB VARCHAR,"+_
  "AccountNo VARCHAR,"+_
  "AccountName VARCHAR,"+_
  "StreetNo VARCHAR,"+_
  "StreetName VARCHAR,"+_
  "Suburb VARCHAR,"+_
  "State VARCHAR,"+_
  "Postcode VARCHAR,"+_
  "Country VARCHAR,"+_
  "ContactName VARCHAR,"+_
  "Phone VARCHAR,"+_
  "Fax VARCHAR,"+_
  "Email VARCHAR,"+_
  "Mobile VARCHAR)"
  
  
  MsgBox "Created a new database file."
  
  ELSE
  
  MsgBox "ERROR - Could not create a new database file! " + 
Str(App.db.ErrorCode) + EndOfLine + EndOfLine + App.db.ErrorMessage
  
  END IF
  END IF
  

Any Ideas?

Thanks
Dave M   
                             Top                chrisjk          Post subject: 
Re: RB2010R2, SQLExecute function does not "appear" in my IDPosted: Sun May 30, 
2010 2:47 am                         
Joined: Fri Mar 12, 2010 2:48 am
Posts: 38
Location: London, UK                Code: db.SQLExecute "Create Table Companies 
("+_

Shouldn't this be

Code: App.db.SQLExecute "Create Table Companies ("+_      
_________________
Chris  
                             Top                 IMIXMMM          Post subject: 
Re: RB2010R2, SQLExecute function does not "appear" in my IDPosted: Sun May 30, 
2010 3:30 am                         
Joined: Thu Oct 26, 2006 4:49 am
Posts: 118                HI Chrisjk,

My db variable is declared in the APP

So "App.db.SQLExecute" or "db.SQLExecute" doesn't  make a difference, I have 
already tested that.


Thanks for replying.

Dave M   
                             Top                npalardy          Post subject: 
Re: RB2010R2, SQLExecute function does not "appear" in my IDPosted: Sun May 30, 
2010 9:39 am                         
Joined: Sat Dec 24, 2005 8:18 pm
Posts: 5928
Location: Canada, Alberta, Near Red Deer                It does make a 
difference IF this method is not located in the APP class      
_________________
My web site Great White Software
RBLibrary.com REALbasic learning  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to