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 3611200
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:50:51+00:00 2026-05-18T21:50:51+00:00

Below I provide my database schema, the database data currently inserted (which is only

  • 0

Below I provide my database schema, the database data currently inserted (which is only one record), and the code I am running. It is a very simple setup, but instead of returning the one record in the database, it returns nothing. Anyone have any idea why? I am on my wit’s end here…

Table: Subcontractor

Columns: listed below in (name type) format.

ID guid, 
BusinessName varchar(50), 
Address varchar(200), 
City varchar(50), 
State varchar(50), 
ZipCode varchar(50), 
Contact varchar(50), 
Phone varchar(50), 
Fax varchar(50), 
Email varchar(200), 
GLOPolicy bit, 
GLOLimit bigint, 
GLOExpiration datetime, 
ALPolicy bit, 
ALLimit bigint, 
ALExpiration datetime, 
WCPolicy bit, 
WCLimit bigint, 
WCExpiration datetime, 
ULPolicy bit, 
ULLimit bigint, 
ULExpiration datetime, 
Notes varchar(15000)

=====

I have one record in my database, as follows.

ID "7b143c19-ad66-46ad-b587-db0bee98cf1e"
BusinessName "1"
Address "1"
City "1"
State "1"
ZipCode "1"
Contact NULL
Phone NULL
Fax NULL 
Email NULL
GLOPolicy False (0) 
GLOLimit NULL 
GLOExpiration NULL
ALPolicy False (0)
ALLimit NULL
ALExpiration NULL
WCPolicy False (0)
WCLimit NULL
WCExpiration NULL
ULPolicy False (0) 
ULLimit NULL
ULExpiration NULL
Notes NULL

=====
*I am attempting the following query, and it returns nothing, when it should obviously return the only record, shown above.*

String ID = "7b143c19-ad66-46ad-b587-db0bee98cf1e";
DataTable dt = sqliteQuery.selectFromDatabase("*", "WHERE ID = '" + ID + "'");

And the code for the above method is…

    public DataTable selectFromDatabase(String column, String filter)
    {
        string SQL = "SELECT " + column + " FROM SUBCONTRACTOR " + filter;
        SQLiteCommand cmd = new SQLiteCommand(SQL);
        cmd.Connection = connection;
        SQLiteDataAdapter da = new SQLiteDataAdapter(cmd);
        DataSet ds = new DataSet();
        try
        {
            da.Fill(ds);
            DataTable dt = ds.Tables[0];
            return dt;
        }
        catch (Exception e)
        {
            MessageBox.Show(e.ToString());
            return null;
        }
        finally
        {
            cmd.Dispose();
            connection.Close();
        }
    }
  • 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-18T21:50:51+00:00Added an answer on May 18, 2026 at 9:50 pm

    It looks like SqLite does not support a GUID type natively. It’s supported by wrappers and plugins but I think that you’re experiencing some impedance between the way the type is used. You are probably better off changing it to a TEXT type. Your predicate will then work.

    EDIT

    To create a new GUID value to insert into the row as a pkey just do:

    Guid.NewGuid().ToString();
    

    In addition I found the following info:

    GUID is not(!) a native
    SQLite-datatype, but an addon provided
    by Robert’s wrapper. In the connection
    string you can specify
    “BinaryGUID=Yes|No”, with Yes as
    default. When “BinaryGUID=Yes” the
    GUID is stored taking 16 bytes of
    storage. Now it depends whether
    “SQLite Expert” recognises the
    datatype GUID. If so, you should look
    at its documentation how it is
    handled. If not, it is probably
    treated as text (likely with invalid
    character data). You will have this
    trouble again when you change your
    SQLite editor or wrapper.

    When “BinaryGUID=No” the GUID is
    stored as text taking 32-38 bytes (I
    don’t know whether the minus-signs and
    braces {} are stored, you have to
    test). When storage is not a large
    problem, I would recommend to use this
    form. You then should have no problems
    with whatsover wrapper or DB editor
    you use and save a lot of time and
    trouble.

    There seems to be an issue with the type itself.

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

Sidebar

Related Questions

Below I have a very simple example of what I'm trying to do. I
Below is the code of a simple html with a table layout. In FF
Below is part of the XML which I am processing with PHP's XSLTProcessor :
Below is my (simplified) schema (in MySQL ver. 5.0.51b) and my strategy for updating
I'm maintaining a web application that utilizes the provider pattern as described below, for
Below are two ways of reading in the commandline parameters. The first is the
Below is my current char* to hex string function. I wrote it as an
Below is my $.ajax call, how do I put a selects (multiple) selected values
Below are lines from the c++ programming language template<class T > T sqrt(T );
Below is a stored procedure to check if there is a duplicate entry in

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.