469,954 Members | 1,759 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,954 developers. It's quick & easy.

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.
Nov 19 '05 #1
6 2472
Hi Matt,
Try going through this at:-
http://office.microsoft.com/en-us/as...745731033.aspx
** Is it possible do change ur DB to SQL SERVER?
Hope it helps
Patrick

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #2
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:Ma**@discussions.microsoft.com]
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.

Nov 19 '05 #3
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.

"Patrick Olurotimi Ige" wrote:
Hi Matt,
Try going through this at:-
http://office.microsoft.com/en-us/as...745731033.aspx
** Is it possible do change ur DB to SQL SERVER?
Hope it helps
Patrick

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #4
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" wrote:
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:Ma**@discussions.microsoft.com]
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.

Nov 19 '05 #5
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:Ma**@discussions.microsoft.com]
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" wrote:
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:Ma**@discussions.microsoft.com]
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.


Nov 19 '05 #6
Thanks for the help. I'll give it a try.

"Wessel Troost" wrote:
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:Ma**@discussions.microsoft.com]
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" wrote:
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:Ma**@discussions.microsoft.com]
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.


Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by John | last post: by
reply views Thread by Access Programming only with macros, no code | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.