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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:59:13+00:00 2026-05-10T20:59:13+00:00

MS Access allows the numeric type GUID (in German it’s called ‘Replikations-ID’, so I

  • 0

MS Access allows the numeric type GUID (in German it’s called ‘Replikations-ID’, so I guess in English that would be ‘replication id’) which is stored as a 16 byte binary field in the database.

I found how to access these fields in Delphi with TADOQuery/TADOTable using

(TheQuery.FieldByName('SomeGuidField') as TGUIDField).AsGuid; 

But now I want to execute an SQL-Query like this:

SELECT * FROM SomeTable WHERE SomeGuidField=:AGuid 

I tried setting a TADOQuery.SQL property to the above statement, but found no way to actually set the AGuid parameter such that the query can be opened. Whatever I tried resulted in the (ADO/COM) error

No value given for one or more required parameters

For example:

TheQuery.ParamByName('AGuid').Value := QuotedString(GuidToStr(AGuid)); TheQuery.Open; // <<== crashes here 

This doesn’t work either:

TheQuery.ParamByName('AGuid').Value := GuidToStr(AGuid); TheQuery.Open; // <<== crashes here 

I had a look at how TGuidField(...).AsGuid works and found that it first converts the GUID to a string and then the string to a variant (and vice versa).

It works fine, if I always generate the SQL-Statement like this:

SELECT * FROM SomeTable WHERE SomeGuidField='<a guid goes here>' 

As I am passing that TADOQuery object around in the program I would like to only change the AGuid-Parameter to keep most methods agnostic on the actual SQL-Statement.

Is there any other way to set a GUID-Parameter than always change the complete SQL-Statement?

(It must be a GUID because I need a globally unique identifier to synchronize with other databases which are MS SQL or MS Access based.)

Edit vradmilovic is right, this works:

TheQuery.ParamByName('AGuid').Value := GuidToStr(AGuid); TheQuery.Open; 

I don’t understand why it didn’t work the first time I tried it.

  • 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. 2026-05-10T20:59:13+00:00Added an answer on May 10, 2026 at 8:59 pm

    That’s correct way to set parameters with ADO. The message you get is most probably due to typo with some of fields (you get same message if field does not exist).

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

Sidebar

Ask A Question

Stats

  • Questions 96k
  • Answers 96k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Welp, It turns out that when I was seeing this:… May 11, 2026 at 7:08 pm
  • Editorial Team
    Editorial Team added an answer Okay, first of all, as mundeep says, connect the event… May 11, 2026 at 7:08 pm
  • Editorial Team
    Editorial Team added an answer You have to refresh the data in your context after… May 11, 2026 at 7:08 pm

Related Questions

MS Access allows the numeric type GUID (in German it's called 'Replikations-ID', so I
MS CRM Dynamics 4.0 incorporates the MS WF engine. The built in designer allows
I've got an MS access database and I would need to create an SQL
Using MS Access 2007, I am creating a student management database. I have tables
I have a bunch of pretty large CSV (comma separated values) files and I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.