How do I use .Net Memory Mapped Files in Ranorex

Class library usage, coding and language questions.
torrgil
Posts: 2
Joined: Tue Apr 30, 2013 8:22 pm

How do I use .Net Memory Mapped Files in Ranorex

Post by torrgil » Wed Jun 12, 2013 3:27 am

Hi All,

I'm trying to read from a CSV and write to a Memory Mapped File to be used later in subsequent script for lookup. Doable?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How do I use .Net Memory Mapped Files in Ranorex

Post by Support Team » Thu Jun 13, 2013 4:31 pm

Hello,

You can use the CSV Data Connector in Ranorex. Please read the section "CSV File" in our user guide in order to get more information how to create a CSV data connector.
Please let me know if I didn't understand your issue correctly.
Thank you!

Regards,
Bernhard
.
Image

torrgil
Posts: 2
Joined: Tue Apr 30, 2013 8:22 pm

Re: How do I use .Net Memory Mapped Files in Ranorex

Post by torrgil » Mon Jun 17, 2013 12:23 am

Bernhard,

That is a partial answer.... I plan to use the CSV connector to read from the CSV file.

Please see MSDN link: msdn.microsoft.com/en-us/library/dd997372.aspx

Here's what I'm trying to do:
=========================================
1) Open EXCEL CSV file
2) Create Memory-Mapped file
3) Read 1st CSV row of data
4) Write data to Memory-Mapped file
5) Get next CSV row of data
6) End_o_file? Yes; Next Stmt / No; go to step 4
7) Close files & End

That's it

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How do I use .Net Memory Mapped Files in Ranorex

Post by krstcs » Mon Jun 17, 2013 1:20 pm

Why are you using a memory-mapped file instead of just using the CSV? It looks like you are complicating matters for no real gain.

Maybe if you told us why you are needing the memory-mapped file we could help you figure out a way to do what you need. If you are just needing to manipulate test data at run-time, you could just use a simple-data-table, read the data into a manipulator method and put it in the SDT the way you need it. Then use the SDT as your data-source for the test cases.

Or, if you are needing real-time lookup, maybe you should just use a database and do real SQL queries on it at the time you need them. SQL Server has an express edition that is free and can be made portable.
Shortcuts usually aren't...