473,394 Members | 1,785 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,394 software developers and data experts.

Reading MS Access Memo Field

Hi All,

I used the below code to get the information from a MS Access database file:
----------------------------------------------------
bdpConnection1.Open();
bdpDataAdapter1.SelectCommand.CommandText = "SELECT * FROM Info WHERE
Email = '" +
email.Text + "'";

bdpDataAdapter1.FillSchema(dataSet1, SchemaType.Source, "Info");
RowNum = bdpDataAdapter1.Fill(dataSet1);
if(RowNum != 0)
{
UserInf.DownloadedFile =
dataSet1.Tables["Info"].Rows[0]["DownloadedFile"].ToString();//***
}
bdpConnection1.Close();
------------------------------------------------------

The "DownloadedFile" field of the database is of type Memo. After running
the code, the value of the UserInf.DownloadedFile is "system.char[]" instead
of the correct value of that. Any help?

Thank you,
Mehrdad
Apr 17 '06 #1
3 4177
What do you expect the data type to be? You can create a string from it by
using the System.String constructor overload:

new string(char[])

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"M. Noroozi Eghbali" <ga****@irandoc.ac.ir> wrote in message
news:%2***************@TK2MSFTNGP03.phx.gbl...
Hi All,

I used the below code to get the information from a MS Access database
file:
----------------------------------------------------
bdpConnection1.Open();
bdpDataAdapter1.SelectCommand.CommandText = "SELECT * FROM Info WHERE
Email = '" +
email.Text + "'";

bdpDataAdapter1.FillSchema(dataSet1, SchemaType.Source, "Info");
RowNum = bdpDataAdapter1.Fill(dataSet1);
if(RowNum != 0)
{
UserInf.DownloadedFile =
dataSet1.Tables["Info"].Rows[0]["DownloadedFile"].ToString();//***
}
bdpConnection1.Close();
------------------------------------------------------

The "DownloadedFile" field of the database is of type Memo. After running
the code, the value of the UserInf.DownloadedFile is "system.char[]"
instead of the correct value of that. Any help?

Thank you,
Mehrdad

Apr 17 '06 #2
it is a struct:

struct stUserInformation
{
public String DownloadedFile;
};

Thanks,
Mehrdad
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eL**************@TK2MSFTNGP05.phx.gbl...
What do you expect the data type to be? You can create a string from it by
using the System.String constructor overload:

new string(char[])

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"M. Noroozi Eghbali" <ga****@irandoc.ac.ir> wrote in message
news:%2***************@TK2MSFTNGP03.phx.gbl...
Hi All,

I used the below code to get the information from a MS Access database
file:
----------------------------------------------------
bdpConnection1.Open();
bdpDataAdapter1.SelectCommand.CommandText = "SELECT * FROM Info WHERE
Email = '" +
email.Text + "'";

bdpDataAdapter1.FillSchema(dataSet1, SchemaType.Source, "Info");
RowNum = bdpDataAdapter1.Fill(dataSet1);
if(RowNum != 0)
{
UserInf.DownloadedFile =
dataSet1.Tables["Info"].Rows[0]["DownloadedFile"].ToString();//***
}
bdpConnection1.Close();
------------------------------------------------------

The "DownloadedFile" field of the database is of type Memo. After running
the code, the value of the UserInf.DownloadedFile is "system.char[]"
instead of the correct value of that. Any help?

Thank you,
Mehrdad


Apr 17 '06 #3
An Access Memo Field is a text field. It can contain only text. It cannot
contain a struct.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"M. Noroozi Eghbali" <ga****@irandoc.ac.ir> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
it is a struct:

struct stUserInformation
{
public String DownloadedFile;
};

Thanks,
Mehrdad
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eL**************@TK2MSFTNGP05.phx.gbl...
What do you expect the data type to be? You can create a string from it
by using the System.String constructor overload:

new string(char[])

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"M. Noroozi Eghbali" <ga****@irandoc.ac.ir> wrote in message
news:%2***************@TK2MSFTNGP03.phx.gbl...
Hi All,

I used the below code to get the information from a MS Access database
file:
----------------------------------------------------
bdpConnection1.Open();
bdpDataAdapter1.SelectCommand.CommandText = "SELECT * FROM Info WHERE
Email = '" +
email.Text + "'";

bdpDataAdapter1.FillSchema(dataSet1, SchemaType.Source, "Info");
RowNum = bdpDataAdapter1.Fill(dataSet1);
if(RowNum != 0)
{
UserInf.DownloadedFile =
dataSet1.Tables["Info"].Rows[0]["DownloadedFile"].ToString();//***
}
bdpConnection1.Close();
------------------------------------------------------

The "DownloadedFile" field of the database is of type Memo. After
running the code, the value of the UserInf.DownloadedFile is
"system.char[]" instead of the correct value of that. Any help?

Thank you,
Mehrdad



Apr 17 '06 #4

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

Similar topics

4
by: intl04 | last post by:
I have a memo field that is included in some Access reports I created. Is there some way for the memo field to display nicely formatted text, with line breaks between paragraphs? Or is it necessary...
28
by: Lee Rouse | last post by:
Hello all, This is going to be a rather lengthy "question". I have an Access 2k database, separated front end/back end. Front end copies are on about 30 workstations and used frequently during...
10
by: mbev | last post by:
I would like to have in a field a big amount of text with a size more than 64K. This field will have text and HTML tags. Is there a way to do this in access? Ok, I may be I need to explain myself...
0
by: htmlgeek | last post by:
I've beaten my head againts this for two weeks and would appreciate any help. Am running Dreamweaver 2004 MX asp pages with MS Access 2000 and then 2003 and received same problems! I've rebuilt...
6
by: Matt | last post by:
I'm having difficulty with trying to update a Access memo field through an SQL statement where the value I'm trying to pass is longer than 255 characters. The field is being truncated. I'm using...
9
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
13
by: Owen Jenkins | last post by:
Following on from an earlier post... I can reliably corrupt a record by doing the following ... Open two separate but identical front ends on one PC each linking to the same back end. Edit a...
2
by: steph | last post by:
I have a table with 250 fields. Of course you are wondering why 250 fields... what could I possibly be storing in so many fields? I am using this table as a general import table for files that...
2
by: dhanashivam | last post by:
hi all, i am creating a VB6.0 application with Ms-Access database. While reading a memo field of my Ms-Access database, the recordset shows some invalid bad charecters like "(1of 2) Deemed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.