473,473 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

maps

I have a database table containing a sparse mapping from an integer to
a string. I retrieve this table into an OleDbDataReader. I'd then like
to copy the data into a map so I can quickly find the string
corresponding to an integer.

My initial thought is to use a std::map but this is causing all kinds
of problems converting between managed and unmanaged types.

Is std::map the right container or is there a better one in the .NET
class library?

If std::map is still the right container how can I convert from the
System::String returned by OleDbDataRead::GetString to something which
can go in a std::map, e.g. std::string and then back to a
System::String?

TIA,
KK

Jun 6 '07 #1
1 1182

<ke***********@googlemail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
>I have a database table containing a sparse mapping from an integer to
a string. I retrieve this table into an OleDbDataReader. I'd then like
to copy the data into a map so I can quickly find the string
corresponding to an integer.

My initial thought is to use a std::map but this is causing all kinds
of problems converting between managed and unmanaged types.

Is std::map the right container or is there a better one in the .NET
class library?
No, STL isn't usable for managed types until at least Orcas.

Try System::Collections::Generic::Dictionary<Key, Value>.
>
If std::map is still the right container how can I convert from the
System::String returned by OleDbDataRead::GetString to something which
can go in a std::map, e.g. std::string and then back to a
System::String?

TIA,
KK

Jun 6 '07 #2

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

Similar topics

4
by: Jeff Sandys | last post by:
I'm trying to write a mapping function for genealogy. I want to read a gedcom database and plot an icon at a geographic location based on a user's query. Can you help me find: 1) A python...
4
by: Stanimir Stamenkov | last post by:
I have this kind of construct: http://www.geocities.com/stanio/temp/usemap01.html (an IMG element using MAP described with AREA elements) I'm trying to make it more accessible and currently...
2
by: Old Monk | last post by:
Hi all, Say I have two maps m1 and m2. Both have key as std::string and value as long. m1 could hold entries like "abc" 123 "def" 456 m2 could have entries like
43
by: Steven T. Hatton | last post by:
Now that I have a better grasp of the scope and capabilities of the C++ Standard Library, I understand that products such as Qt actually provide much of the same functionality through their own...
3
by: Sean | last post by:
Have you ever wanted to add the great features inherent in Google Maps? Here is how you do it. ============== == STEP ONE == ============== Create a new MS Access form called frmGoogleMap....
0
by: Philadelphia XML User Group | last post by:
NEXT MEETING: March 8th, 6:00 to 8:00 pm A Definitive Introduction to Topic Maps with Michel Biezunski and Roger Sperberg To sign up, please visit http://www.xmlphilly.org/signup.asp ...
6
by: Sam Carleton | last post by:
Ok, over the years I have read about doing web programing and I have done some real basic stuff. Now I am digging into some real ASP.Net 2.0 and am totally lost some things. I have a master...
2
by: QDL | last post by:
Hello, Does anybody know any good component/library to display maps from a local source using ASPNET. I'd like to have a "local" google-maps. Our app would display maps (with zoom, pan,...
2
by: rn5arn5a | last post by:
I am not sure where I should have posted this question in this newsgroup. Please excuse me if I am wrong. Nowadays, a lot of websites have come with Maps (Google Maps being an example). Can...
3
by: Phil Stanton | last post by:
I have a button on a form which when pressed displays a google map of the address. Code is Private Sub Googlemap_Click() MakeURL ("") End Sub
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.