473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

OCI Bind for RAW field, Cannot select a record matching a hexadecimal Key (raw type)

Greetings,
I have a table MYTABLE ( msg_id RAW(24) NOT NULL) , .....)
msg_id is the key,

If I wanted to select a record using the OCI, the select is failing. I
can see that the value exists using sqlplus. I guess I am not doing
the Bind correctly.
'414D51204D45525420202020202020203F2293C209CBD012' is a example value
for msg_id, obtained from the select in SQLplus, when i use the OCI
app
I have the value
char tmp_str[] ="414D51204D45525420202020202020203F2293C209CBD012 ");
unsigned char mid_var[48];
memcpy(&mid_var,tmp_str,48); //to clear the null termination

select count(*) from MYTABLE where msg_id = :msg_input;

I do allocate the handles, prepare,define and all the other stuff.
I do a Bind with
rc = OCIBindByName(p_sql,
&p_bnd,
p_err,
(text *) ":msg_input",
-1,
(dvoid *)&mid_var,
sizeof(24), //tried with sizeof(48) - doesnt help
SQLT_BIN,// tried with SQLT_CHR - doesnt help
(dvoid *) 0,
(ub2 *) 0,
(ub2 *) 0,
(ub4) 0,
(ub4 *) 0,
OCI_DEFAULT);

and the execution returns nothing.
PLEASE provide me with sample code that you can bind and retrieve data
based off the primary key of RAW type.
Help is greatly appreciated.
Many thanks,
Jul 19 '05 #1
0 2200

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: js | last post by:
I am trying to build a query on a SQL2000 text field which contains XML string. The query is like "select requestnumber from history where requestnumber is like '%re1%'". As you can see in the...
3
by: Earl Teigrob | last post by:
I am considering writing a Class that Selects, Adds, Updates and Deletes Nodes in an XML File but do not what to reinvent the wheel. (See XML file below) That data format would emulate records...
8
by: mark | last post by:
Access2000 How do I write a query that combines the CTC field from each record below into one record? I need to concatenate the CTC field with a separator, like below: ...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
1
by: geronimo_me | last post by:
Hi, I have a small problem I am trying to check if field1 in Table1 matches Field2, Field3 or Field4 in Table2: ie Record 1 Table1 Field1 = ABC Table2
3
by: Lori Markle via .NET 247 | last post by:
(Type your message here) Hi, I'm having a problem with binding a textbox to a dataset. Cananybody figure out what's going on here? I simply want to update a record. Type in a permit number...
2
by: hackmagic | last post by:
Hi, i have a form that normally has a Recordset containing only one record bound to it. i have replaced the navigation buttons with my own and the 'New Record' button assigns an empty Recordset...
0
by: Anand Mamuder | last post by:
Greetings, I have a table MYTABLE ( msg_id RAW(24) NOT NULL) , .....) msg_id is the key, If I wanted to select a record using the OCI, the select is failing. I can see that the value exists...
7
by: kirkgilbert | last post by:
I am trying to do an onchange event in a form using a text field. The form is tied to a record set that is part of a repeated region. One the first record when I edit the data it works perfectly. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.