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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:31:54+00:00 2026-05-22T18:31:54+00:00

For the record, I’m creating an iOS application (iPhone and iPad). Here’s the setup

  • 0

For the record, I’m creating an iOS application (iPhone and iPad).

Here’s the setup of my problem:

I have a sqlite db that I cannot change. This DB has a id field of type GUID. Now, I know that sqlite doesn’t have an actual GUID type, which is fine. The values were created using a hash that I have access to. The sqlite db was created from a SQL Server DB using a converter I do not have access to. I’d like to avoid using the hash to recreate the guid (which I can do).

This is essentially my question: Is there a native way to decode the guid column type into something Objective-c can read?

EDIT: I originally pulled the values out with sqlite3_column_text, and the values displayed as asian characters. I updated it to the code below, but the translation is giving me the incorrect guid value:

        NSString* query = [NSString stringWithFormat:
                       @"select CcoDrugPage.Id, CcoDrugPage.Title, DetailText.Text "
                       "from CcoDrugPage inner join DetailText on CcoDrugPage.TextId = DetailText.Id "
                       "where CcoDrugPage.DrugName = '%@' and PrototypeSuffix like 'Drug%%' "
                       "order by SortOrder "
                       "limit %i "
                       , self.title, initial ? 2 : 100];

    sqlite3_stmt* statement;
    if(sqlite3_prepare_v2(db, [query UTF8String], -1, &statement, nil) == SQLITE_OK) {
        int i = 0;
        while(sqlite3_step(statement) == SQLITE_ROW) {
            DrugSection* section = [[[DrugSection alloc] init] autorelease];

            char* rowData = (char*)sqlite3_column_text(statement, 0);
            CFUUIDRef uuidObj = CFUUIDCreateWithBytes(nil,
                                                      rowData[0],
                                                      rowData[1],
                                                      rowData[2],
                                                      rowData[3],
                                                      rowData[4],
                                                      rowData[5],
                                                      rowData[6],
                                                      rowData[7],
                                                      rowData[8],
                                                      rowData[9],
                                                      rowData[10],
                                                      rowData[11],
                                                      rowData[12],
                                                      rowData[13],
                                                      rowData[14],
                                                      rowData[15]);


            section.pageID = (NSString*)CFUUIDCreateString(nil, uuidObj);
            CFRelease(uuidObj);

            rowData = (char*)sqlite3_column_text(statement, 1);
            NSString* sectionTitle = [NSString stringWithUTF8String:rowData];

            rowData = (char*)sqlite3_column_text(statement, 2);
            NSString* sectionText = [NSString stringWithUTF8String:rowData];
  • 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-22T18:31:54+00:00Added an answer on May 22, 2026 at 6:31 pm

    It appears the issue here was due to the actual GUID field being corrupt in the converted SQLite database. The converted hex value in the field contained 59 characters, and we all know that GUIDs contain at most 32 characters if you don’t include the braces and dashes.

    I had the client convert the field to play TEXT to solve the problem.

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

Sidebar

Related Questions

I have a record set that includes a date field, and want to determine
I have the following record definition: -record(contact, {name, email}) Assuming that I have a
I have a Record model (Active Record) that stores some custom logs. Record is
I have a record that contains a dynamic array. It is normal that when
If I have a record like this; { text: text goes here, words: [text,
My record sheet app has a menu option for creating a new, blank record
Application able to record error in OnError, but we are not able to do
When I retrieve a record using LINQ that has a DateTime field only the
I have added a record to my table which auto-increments the primary key. I
I have a record of data with unix time date in it i want

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.