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

  • SEARCH
  • Home
  • 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 7826211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:18:21+00:00 2026-06-02T09:18:21+00:00

When i am trying to create 2 table in database only sql_stmt is working

  • 0

When i am trying to create 2 table in database only “sql_stmt” is working and “sql_stmt1” is not working in below code(but it showing that it is executed).

So only one table is creating but i want to create two table.

How can i create two table at a same in database.

const char *sql_stmt = "CREATE TABLE DOSAGE_HISTORY50(PILL_NAME VARCHAR(100),PILL_PER_DOSE NUMBER,PILLS_REMAINING NUMBER,SCHEDULE VARCHAR(100),DIRECTION VARCHAR(100))";
        const char *sql_stmt1 = "CREATE TABLE DOCTOR (ID varchar(20))";


        if (sqlite3_exec(pillDB, sql_stmt, NULL, NULL, &errMsg) != SQLITE_OK) {

        }

    if (sqlite3_exec(pillDB, sql_stmt1, NULL, NULL, &errMsg) != SQLITE_OK) {

    }
  • 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-06-02T09:18:25+00:00Added an answer on June 2, 2026 at 9:18 am

    You’re executing sql_stmt1 two times, trying to create table doctor. I think your first if statement should be:

    if (sqlite3_exec(pilldDB, sql_stmt...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create an application which requires a two table SQLite database
I'm trying to create a database with 12 different tables which has been working
I'm trying to create a basic database trigger that conditionally deletes rows from database1.table1
I'm trying to reindex a table in a simple database that I created using
I am trying to create a table though prepare statement but it is giving
I am trying to create a table in MySql using php. My code looks
Imagine a database table that looks like this: create table [dbo].[user] ( id int
I'm trying to create a query that pulls information about sellers from my database,
I'm trying the following: CREATE TABLE Table1 ( RecordNo autonumber, --error here! PersonId varchar(50),
I'm trying to create a table on a Microsoft SQL Server 2005 (Express). When

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.