Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 503467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:23:49+00:00 2026-05-13T06:23:49+00:00

I am trying to write the value of 3 variables (Username, Email, Password) to

  • 0

I am trying to write the value of 3 variables (Username, Email, Password) to an SQLite Database. I can write text to the database but not a variable. How would I do this?

My Code:

SQCommand.CommandText = "INSERT INTO login_data (username, password, email) VALUES (Username, Password, Email)"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:23:50+00:00Added an answer on May 13, 2026 at 6:23 am

    I’m not a VB guy so I’m guessing here…

    SQCommand.CommandText = "INSERT INTO login_data (username, password, email) VALUES ("  + Username + "," + Password + "," + Email + ")"
    

    There are better ways to do this, but for quick and dirty this should get the job done.

    Edit:—-
    Because of all of the drive-bys saying this is bad practice I guess I should add a caveat here.

    IFF the contents of these variables were provided by the user, AND they have not already been either Escaped or validated in some way. They might contain SQL commands, so a simple concatenation at this point could expose your database to a SQL Injection attack.

    I should also tip my hat to all of the programmers who can tell from looking at only a single line of code and knowing nothing else about the program that simple concatenation is clearly the wrong thing to do here. Your understand of code is clearly magical.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to insert a variable's value into a url, but it's not working;
I'm trying to write a function that can alter the value of a column
I am trying to write to my database if a variable is equal to
I am trying to write a simple regex to match a percentage value range
I'm trying to write a function : Input: Source range, Source value, output range,
I am trying write a function that generates simulated data but if the simulated
SET @Password = ( SELECT UserPassword,IsLocked FROM [Authentication].[tblLogin] WHERE UserName=@UserName) i m trying to
I'm trying to write a application that sends user's geolocation to MYSQL database every
So I am trying to write a function that receives a float value, returns
Hopefully someone can help me with this. I'm trying to write a script with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.