notes stored in .mdb when converted from projects

M

mxiong

I have created a file using projects and then saved it as a .mdb file so that
I can access the information using a web front end. The .mdb file can be
opened using Access or Projects. The problem is that the Notes I entered in
Projects isn't fully stored in the database. For example, I may enter this
note: This task is very simple and should only required 1 person to complete
within 2 hours. When I save this, and open the file using Access, the note
will then appear as so: This task is very simple and ... When I pull out the
data to a webfront end, I get: This task is very simple and ... When I open
the database using Projects, the note appears as so: This task is very simple
and should only required 1 person to complete within 2 hours. I need to know
how I can save the entire note into the database and pull out the entire note
to a web front end.
 
D

DavidC

Been there done that. The full notes are stored as binary data in the
TASK_RTF_NOTES field in MSP_TASKS table. This field needs converting from
binary to text using VBA
rtf = StrConv(rsb.Fields("TASK_RTF_NOTES"), vbUnicode) ' Convert binary data
into text string
rtf is then a string including a lot of symbols. You then need to trim the
symbols from in front of and behind the text.

BOL
DavidC
 
M

mxiong

I'm getting this error: Type mismatch: 'StrConv'

Here's what I did:
Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("dntProjects.mdb")

Set rsNotes = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT TASK_RTF_NOTES FROM MSP_TASKS where (TASK_ID = 19);"

rsNotes.Open strSQL, adoCon

Do While not rsNotes.EOF
rtf = StrConv(rsNotes("TASK_RTF_NOTES"), vbUnicode)
Response.write ("<font face=Arial, Helvetica, san size=2>" & rtf &
"</font><br><br>")
rsNotes.MoveNext
Loop

rsNotes.Close
Set rsNotes= Nothing
Set adoCon = Nothing

Where am I going wrong?
 
D

DavidC

Sorry, should have mentioned that in my code i had

Set rsb=db.openrecordset("MSP_TASKS",dbopendynaset)
 
M

mxiong

Okay, so how can I use StrConv for my code?

DavidC said:
Sorry, should have mentioned that in my code i had

Set rsb=db.openrecordset("MSP_TASKS",dbopendynaset)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top