Update Access Memo field from ASP.NET

G

Guest

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 a simple INSERT INTO
sql command. Anyone know a way around this?

Sample

strSQL = "INSERT INTO tblListings " & _
"(Dir, Street, City, State, " & _
"AFirst, Price, ALast, MainPhoto, Summary, Details,
UnderContract, Sold ) VALUES (" & _
"'" & dir & "'," & _
"'" & istreet.text & "'," & _
"'" & icity.text & "'," & _
"'" & istate.selecteditem.text & "'," & _
"'" & ifname.text & "'," & _
"'" & iprice.text & "'," & _
"'" & ilname.text & "'," & _
"'" & fname & "'," & _
"'" & strsummary & "'," & _
"'" & strdetails & "'," & _
"'" & ckcontract.checked & "'," & _
"'" & cksold.checked & "')"

Any help would be greatly apprciated.
 
W

Wessel Troost

Open a read/write recordset on the table. (Not through an SQL query.)
This allows you to update the memo field.

Greetings,
Wessel

-----Original Message-----
From: Matt [mailto:[email protected]]
Posted At: Monday, April 11, 2005 3:57 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Update Access Memo field from ASP.NET
Subject: Update Access Memo field from ASP.NET

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 a simple INSERT
INTO
sql command. Anyone know a way around this?

Sample

strSQL = "INSERT INTO tblListings " & _
"(Dir, Street, City, State, " & _
"AFirst, Price, ALast, MainPhoto, Summary, Details,

UnderContract, Sold ) VALUES (" & _
"'" & dir & "'," & _
"'" & istreet.text & "'," & _
"'" & icity.text & "'," & _
"'" & istate.selecteditem.text & "'," & _
"'" & ifname.text & "'," & _
"'" & iprice.text & "'," & _
"'" & ilname.text & "'," & _
"'" & fname & "'," & _
"'" & strsummary & "'," & _
"'" & strdetails & "'," & _
"'" & ckcontract.checked & "'," & _
"'" & cksold.checked & "')"

Any help would be greatly apprciated.
 
G

Guest

Unfortunately, I want to be able to use an Access database at this point. I
looked through the comparisons and see how it could work with SQL Server.
But, I still haven't found a solution for Access.
 
G

Guest

I'm new to ASP.NET and I've never done an update except through an SQL
statement. Could you provide an example of your suggestion? It would be
greatly appreciated.

Thanks in advance,

Matt
 
W

Wessel Troost

Matt,

Sorry, I'm too busy right now to write an example. However, basically
it's something like this:
- Add a reference to the COM object "Micrsoft ActiveX Data Objects"
- Create an ADODB connection object with the right connection string
(examples can be found through google)
- Recordset = Connection->Open("tablename")
- Find the right record
- Update the memofield like: RecordSet("MyField") = "Long text"

I'm not sure that this would even work, but it's the road I would try...

Regards,
Wessel

-----Original Message-----
From: Matt [mailto:[email protected]]
Posted At: Monday, April 11, 2005 2:55 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Update Access Memo field from ASP.NET
Subject: Re: Update Access Memo field from ASP.NET

I'm new to ASP.NET and I've never done an update except through an SQL
statement. Could you provide an example of your suggestion? It would
be
greatly appreciated.

Thanks in advance,

Matt
 
G

Guest

Thanks for the help. I'll give it a try.

Wessel Troost said:
Matt,

Sorry, I'm too busy right now to write an example. However, basically
it's something like this:
- Add a reference to the COM object "Micrsoft ActiveX Data Objects"
- Create an ADODB connection object with the right connection string
(examples can be found through google)
- Recordset = Connection->Open("tablename")
- Find the right record
- Update the memofield like: RecordSet("MyField") = "Long text"

I'm not sure that this would even work, but it's the road I would try...

Regards,
Wessel

-----Original Message-----
From: Matt [mailto:[email protected]]
Posted At: Monday, April 11, 2005 2:55 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Update Access Memo field from ASP.NET
Subject: Re: Update Access Memo field from ASP.NET

I'm new to ASP.NET and I've never done an update except through an SQL
statement. Could you provide an example of your suggestion? It would
be
greatly appreciated.

Thanks in advance,

Matt

Wessel Troost said:
Open a read/write recordset on the table. (Not through an SQL query.)
This allows you to update the memo field.

Greetings,
Wessel

-----Original Message-----
From: Matt [mailto:[email protected]]
Posted At: Monday, April 11, 2005 3:57 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Update Access Memo field from ASP.NET
Subject: Update Access Memo field from ASP.NET

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 a simple INSERT
INTO
sql command. Anyone know a way around this?

Sample

strSQL = "INSERT INTO tblListings " & _
"(Dir, Street, City, State, " & _
"AFirst, Price, ALast, MainPhoto, Summary, Details,

UnderContract, Sold ) VALUES (" & _
"'" & dir & "'," & _
"'" & istreet.text & "'," & _
"'" & icity.text & "'," & _
"'" & istate.selecteditem.text & "'," & _
"'" & ifname.text & "'," & _
"'" & iprice.text & "'," & _
"'" & ilname.text & "'," & _
"'" & fname & "'," & _
"'" & strsummary & "'," & _
"'" & strdetails & "'," & _
"'" & ckcontract.checked & "'," & _
"'" & cksold.checked & "')"

Any help would be greatly apprciated.
 

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

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top