Questions
log in
tour
Documentation Beta
Jobs
help
Search Q&A
Tags
Users
Badges
Ask Question
x Dismiss
Sign up
3 years ago
9 months ago
I am stuck using basic4android as regards updating a record in a sql db (Lover.db). This works:
UPCOMING EVENTS
But of course the just updates with the data in the single quotes. I want to used some variables, and
have tried this
SQLLover.ExecNonQuery2("Update Profiles SET(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", & _
Array As Object(Nos, Nme, SundayX, MondayX, TuesdayX, WednesdayX, & _
ThursdayX, FridayX, SaturdayX, lblTimeFrom.Text, lblTimeTo.Text))
Is this the correct syntax? Of coures, Nos , Nme , SundayX etc are my variables.
No office location
$48,000 - $96,000
basic4android
ruby-on-rails
edited Jan 20 '13 at 1:19
user1993185
972
12
33
active
oldest
votes
c#
No office location
REMOTE
.net
2 Answers
REMOTE
postgresql
Your UPDATE syntax is entirely wrong. The correct syntax is UPDATE table SET column = value,
column2 = value2 and so forth. You've done nothing even remotely close to that with your code. I'm
not going to bother to type out the whole thing, but I'll do enough to get you started:
No office location
REMOTE
test-automation
selenium
Crossover
.net
tdd
Ken White
95.1k
11
111
202
With your code, the working one, to be able to used variable in the query, you have to escape the
query and concatenate the variable. Look at this short example
No office location
REMOTE
Related
0
0
what is the way to install the basic4android
SQLLover.ExecNonQuery("UPDATE Profiles SET Mobile = ' " & NOs & " ', Name = ' "&NMe & " ' WHERE Name = ' " & OldNameVariable & " ' ")
0
basic4android
android.os.networkonmainthreadexception
error
Basic4android - Jsonparser
SO TO USE VARIABLE Insert "& VARIABLENAME &" as in the example (Mobile = ' "& Nos &"')
HINT: The last query should look like this: AND Name=' " & SamOldVariableName & " ' ")
share improve this answer
boluvisako
16
Your Answer
Sign up or log in
Post as a guest
Name
Managing Dearness
Email
required, but never shown
By posting your answer, you agree to the privacy policy and terms of service.
Not the answer you're looking for? Browse other questions tagged
basic4android
question.
question feed
about us
tour
help
blog
chat
data
legal
privacy policy
work here
TECHNOLOGY
Stack Overflow
Server Fault
Super User
Web
Applications
Ask Ubuntu
Webmasters
Game
Development
TeX - LaTeX
advertising info
mobile
LIFE / ARTS
Software
Engineering
Database
Administrators
Drupal Answers
Ask Different
(Apple)
SharePoint
Signal
Processing
User Experience
Raspberry Pi
Mathematica
Programming
Puzzles & Code
Golf
WordPress
Development
Geographic
Information
Systems
Salesforce
Electrical
Engineering
Cryptography
ExpressionEngine
Answers
Code Review
Photography
Academia
Magento
Science
Fiction &
Fantasy
more (8)
more (7)
SCIENCE
English
Language &
Usage
Bicycles
MathOverflow
Philosophy
Role-playing
Games
Mathematics
more (3)
Skeptics
Mi Yodeya
(Judaism)
Movies & TV
Travel
Music: Practice
& Theory
Christianity
Seasoned
Advice
(cooking)
Home
Improvement
Information
Security
Personal
Finance &
Money
site design / logo 2016 Stack Exchange Inc user contributions licensed under cc by-sa 3.0 with attribution required
feedback
CULTURE / RECREATION
Graphic
Design
Android
Enthusiasts
rev 2016.11.16.4205
contact us
English
Language
Learners
Japanese
Language
Arqade
(gaming)
Anime &
Manga
Cross
Validated
(stats)
Motor Vehicle
Maintenance &
Repair
Theoretical
Computer
Science
more (17)
Physics
Chemistry
Biology
Computer
Science
OTHER
Meta Stack
Exchange
Stack Apps
Area 51
Stack
Overflow
Talent