Android Question A couple of questions for DB Experts

Lary Yenta

Member
Licensed User
Longtime User
I am hoping that I can get a couple of answers here from Klaus or another DB Expert. I have come to believe that the best way for me to produce some of my reports would be to dump data into an empty table and proceed from there. I recognize that the best way to do this would be to create the table on the first time run of things but to test this methodology, I tried to use a create statement but did not succeed in creating a table. The code I used was the following:

B4X:
  Query = "CREATE TABLE RptTemp Date TEXT, Time TEXT, Glucose Real"    
  SQL1.ExecNonQuery(Query)
 

fixit30

Active Member
Licensed User
Longtime User
Your code should be this.

B4X:
Query = "CREATE TABLE RptTemp (Date TEXT, Time TEXT, Glucose Real)"
 
Upvote 0

Lary Yenta

Member
Licensed User
Longtime User
Yeah, I caught that in the middle of posting but I could not figure out how to cancel the post

Sorry bout that :(

lary
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
You are missing the parentheses. That is all:
B4X:
Query = "CREATE TABLE  IF NOT EXISTS  RptTemp (Date TEXT, Time TEXT, Glucose Real)" 
 SQL1.ExecNonQuery(Query)
 
Upvote 0
Top