Greetings all
I have a form that reads a access memo field. I can query the database to
get the info in the memo field without a problem...but when i try to update
the data i get a exception. The text in the memo field can be large. It
seens to throw the exception only when large amounts of data is being
updated. The following is the update code : rtNotes is a richtext textbox..
any help will be appreciated
Dim mNotes As String = rtNotes.Text & String.Empty ''
sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where
str(trim(MasterId)) = " & _
"' " & Trim(glbLookup) & " '"
SetUpDataBase()
Try
cmd.ExecuteNonQuery()
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
btnSave.Enabled = False
With Label6
..Text = "Locked"
..ForeColor = Color.Black
End With 12 1210
Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string
the same size as one that fails. Also, try saving the data through vb .net
itself, instead of using an update sql statement - one should not work
better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have updated
the memo field when the exception occurred. I could then test it on my
system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message
news:O6**************@TK2MSFTNGP11.phx.gbl... Greetings all
I have a form that reads a access memo field. I can query the database to get the info in the memo field without a problem...but when i try to update the data i get a exception. The text in the memo field can be large. It seens to throw the exception only when large amounts of data is being updated. The following is the update code : rtNotes is a richtext textbox.. any help will be appreciated Dim mNotes As String = rtNotes.Text & String.Empty ''
sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where str(trim(MasterId)) = " & _
"' " & Trim(glbLookup) & " '"
SetUpDataBase()
Try
cmd.ExecuteNonQuery()
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
btnSave.Enabled = False
With Label6
.Text = "Locked"
.ForeColor = Color.Black
End With
Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string
the same size as one that fails. Also, try saving the data through vb .net
itself, instead of using an update sql statement - one should not work
better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have updated
the memo field when the exception occurred. I could then test it on my
system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message
news:O6**************@TK2MSFTNGP11.phx.gbl... Greetings all
I have a form that reads a access memo field. I can query the database to get the info in the memo field without a problem...but when i try to update the data i get a exception. The text in the memo field can be large. It seens to throw the exception only when large amounts of data is being updated. The following is the update code : rtNotes is a richtext textbox.. any help will be appreciated Dim mNotes As String = rtNotes.Text & String.Empty ''
sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where str(trim(MasterId)) = " & _
"' " & Trim(glbLookup) & " '"
SetUpDataBase()
Try
cmd.ExecuteNonQuery()
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
btnSave.Enabled = False
With Label6
.Text = "Locked"
.ForeColor = Color.Black
End With
Hi Bernie
After slamming my head against the desk, i noticed the only time i get a
exception is when a apostrophy is in the text like (didn't) ... there has to
be a way around it
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string the same size as one that fails. Also, try saving the data through vb
..net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have
updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... Greetings all
I have a form that reads a access memo field. I can query the database
to get the info in the memo field without a problem...but when i try to update the data i get a exception. The text in the memo field can be large. It seens to throw the exception only when large amounts of data is being updated. The following is the update code : rtNotes is a richtext textbox.. any help will be appreciated Dim mNotes As String = rtNotes.Text & String.Empty ''
sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where str(trim(MasterId)) = " & _
"' " & Trim(glbLookup) & " '"
SetUpDataBase()
Try
cmd.ExecuteNonQuery()
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
btnSave.Enabled = False
With Label6
.Text = "Locked"
.ForeColor = Color.Black
End With
Hi Bernie
After slamming my head against the desk, i noticed the only time i get a
exception is when a apostrophy is in the text like (didn't) ... there has to
be a way around it
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string the same size as one that fails. Also, try saving the data through vb
..net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have
updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... Greetings all
I have a form that reads a access memo field. I can query the database
to get the info in the memo field without a problem...but when i try to update the data i get a exception. The text in the memo field can be large. It seens to throw the exception only when large amounts of data is being updated. The following is the update code : rtNotes is a richtext textbox.. any help will be appreciated Dim mNotes As String = rtNotes.Text & String.Empty ''
sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where str(trim(MasterId)) = " & _
"' " & Trim(glbLookup) & " '"
SetUpDataBase()
Try
cmd.ExecuteNonQuery()
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
btnSave.Enabled = False
With Label6
.Text = "Locked"
.ForeColor = Color.Black
End With
i seemed to be sucessfull with the following:
mNotes = Replace(mNotes, "'", "''")
but im still concerned about the max length of the string vs a memo
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string the same size as one that fails. Also, try saving the data through vb
..net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have
updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... Greetings all
I have a form that reads a access memo field. I can query the database
to get the info in the memo field without a problem...but when i try to update the data i get a exception. The text in the memo field can be large. It seens to throw the exception only when large amounts of data is being updated. The following is the update code : rtNotes is a richtext textbox.. any help will be appreciated Dim mNotes As String = rtNotes.Text & String.Empty ''
sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where str(trim(MasterId)) = " & _
"' " & Trim(glbLookup) & " '"
SetUpDataBase()
Try
cmd.ExecuteNonQuery()
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
btnSave.Enabled = False
With Label6
.Text = "Locked"
.ForeColor = Color.Black
End With
i seemed to be sucessfull with the following:
mNotes = Replace(mNotes, "'", "''")
but im still concerned about the max length of the string vs a memo
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string the same size as one that fails. Also, try saving the data through vb
..net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have
updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... Greetings all
I have a form that reads a access memo field. I can query the database
to get the info in the memo field without a problem...but when i try to update the data i get a exception. The text in the memo field can be large. It seens to throw the exception only when large amounts of data is being updated. The following is the update code : rtNotes is a richtext textbox.. any help will be appreciated Dim mNotes As String = rtNotes.Text & String.Empty ''
sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where str(trim(MasterId)) = " & _
"' " & Trim(glbLookup) & " '"
SetUpDataBase()
Try
cmd.ExecuteNonQuery()
Catch Ex As Exception
MsgBox(Ex.ToString)
End Try
btnSave.Enabled = False
With Label6
.Text = "Locked"
.ForeColor = Color.Black
End With
Hi Stephen,
You can escape it with
this is it's element
this is it''s element
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message
news:Oa**************@TK2MSFTNGP09.phx.gbl... i seemed to be sucessfull with the following: mNotes = Replace(mNotes, "'", "''")
but im still concerned about the max length of the string vs a memo
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string the same size as one that fails. Also, try saving the data through vb .net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... > Greetings all > > I have a form that reads a access memo field. I can query the database to > get the info in the memo field without a problem...but when i try to > update > the data i get a exception. The text in the memo field can be large. It > seens to throw the exception only when large amounts of data is being > updated. The following is the update code : rtNotes is a richtext > textbox.. > any help will be appreciated > Dim mNotes As String = rtNotes.Text & String.Empty '' > > sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where > str(trim(MasterId)) = " & _ > > "' " & Trim(glbLookup) & " '" > > SetUpDataBase() > > Try > > cmd.ExecuteNonQuery() > > Catch Ex As Exception > > MsgBox(Ex.ToString) > > End Try > > btnSave.Enabled = False > > With Label6 > > .Text = "Locked" > > .ForeColor = Color.Black > > End With > >
Hi Stephen,
You can escape it with
this is it's element
this is it''s element
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message
news:Oa**************@TK2MSFTNGP09.phx.gbl... i seemed to be sucessfull with the following: mNotes = Replace(mNotes, "'", "''")
but im still concerned about the max length of the string vs a memo
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string the same size as one that fails. Also, try saving the data through vb .net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... > Greetings all > > I have a form that reads a access memo field. I can query the database to > get the info in the memo field without a problem...but when i try to > update > the data i get a exception. The text in the memo field can be large. It > seens to throw the exception only when large amounts of data is being > updated. The following is the update code : rtNotes is a richtext > textbox.. > any help will be appreciated > Dim mNotes As String = rtNotes.Text & String.Empty '' > > sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where > str(trim(MasterId)) = " & _ > > "' " & Trim(glbLookup) & " '" > > SetUpDataBase() > > Try > > cmd.ExecuteNonQuery() > > Catch Ex As Exception > > MsgBox(Ex.ToString) > > End Try > > btnSave.Enabled = False > > With Label6 > > .Text = "Locked" > > .ForeColor = Color.Black > > End With > >
Hi Stephen,
Yes, you are essentially escaping it with '' - and the replace method is
precisely the way I go about it also.
Bernie
"Stephen" <St******@xjohnstontrading.com> wrote in message
news:Oa**************@TK2MSFTNGP09.phx.gbl... i seemed to be sucessfull with the following: mNotes = Replace(mNotes, "'", "''")
but im still concerned about the max length of the string vs a memo
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string the same size as one that fails. Also, try saving the data through vb .net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... > Greetings all > > I have a form that reads a access memo field. I can query the database to > get the info in the memo field without a problem...but when i try to > update > the data i get a exception. The text in the memo field can be large. It > seens to throw the exception only when large amounts of data is being > updated. The following is the update code : rtNotes is a richtext > textbox.. > any help will be appreciated > Dim mNotes As String = rtNotes.Text & String.Empty '' > > sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where > str(trim(MasterId)) = " & _ > > "' " & Trim(glbLookup) & " '" > > SetUpDataBase() > > Try > > cmd.ExecuteNonQuery() > > Catch Ex As Exception > > MsgBox(Ex.ToString) > > End Try > > btnSave.Enabled = False > > With Label6 > > .Text = "Locked" > > .ForeColor = Color.Black > > End With > >
Hi Stephen,
Yes, you are essentially escaping it with '' - and the replace method is
precisely the way I go about it also.
Bernie
"Stephen" <St******@xjohnstontrading.com> wrote in message
news:Oa**************@TK2MSFTNGP09.phx.gbl... i seemed to be sucessfull with the following: mNotes = Replace(mNotes, "'", "''")
but im still concerned about the max length of the string vs a memo
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a string the same size as one that fails. Also, try saving the data through vb .net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... > Greetings all > > I have a form that reads a access memo field. I can query the database to > get the info in the memo field without a problem...but when i try to > update > the data i get a exception. The text in the memo field can be large. It > seens to throw the exception only when large amounts of data is being > updated. The following is the update code : rtNotes is a richtext > textbox.. > any help will be appreciated > Dim mNotes As String = rtNotes.Text & String.Empty '' > > sqlStatement = "update master set Cust_Notes = ' " & mNotes & " ' where > str(trim(MasterId)) = " & _ > > "' " & Trim(glbLookup) & " '" > > SetUpDataBase() > > Try > > cmd.ExecuteNonQuery() > > Catch Ex As Exception > > MsgBox(Ex.ToString) > > End Try > > btnSave.Enabled = False > > With Label6 > > .Text = "Locked" > > .ForeColor = Color.Black > > End With > >
Thank you ....your help is appreciated
-S-
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl... Hi Stephen,
Yes, you are essentially escaping it with '' - and the replace method is precisely the way I go about it also.
Bernie
"Stephen" <St******@xjohnstontrading.com> wrote in message news:Oa**************@TK2MSFTNGP09.phx.gbl...i seemed to be sucessfull with the following: mNotes = Replace(mNotes, "'", "''")
but im still concerned about the max length of the string vs a memo
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a
string the same size as one that fails. Also, try saving the data through vb .net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... > Greetings all > > I have a form that reads a access memo field. I can query the
database to > get the info in the memo field without a problem...but when i try to > update > the data i get a exception. The text in the memo field can be large.
It > seens to throw the exception only when large amounts of data is being > updated. The following is the update code : rtNotes is a richtext > textbox.. > any help will be appreciated > Dim mNotes As String = rtNotes.Text & String.Empty '' > > sqlStatement = "update master set Cust_Notes = ' " & mNotes & " '
where > str(trim(MasterId)) = " & _ > > "' " & Trim(glbLookup) & " '" > > SetUpDataBase() > > Try > > cmd.ExecuteNonQuery() > > Catch Ex As Exception > > MsgBox(Ex.ToString) > > End Try > > btnSave.Enabled = False > > With Label6 > > .Text = "Locked" > > .ForeColor = Color.Black > > End With > >
Thank you ....your help is appreciated
-S-
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl... Hi Stephen,
Yes, you are essentially escaping it with '' - and the replace method is precisely the way I go about it also.
Bernie
"Stephen" <St******@xjohnstontrading.com> wrote in message news:Oa**************@TK2MSFTNGP09.phx.gbl...i seemed to be sucessfull with the following: mNotes = Replace(mNotes, "'", "''")
but im still concerned about the max length of the string vs a memo
"Bernie Yaeger" <be*****@cherwellinc.com> wrote in message news:e2**************@tk2msftngp13.phx.gbl... Hi Stephen,
A couple of ideas: try updating the column inside ms access with a
string the same size as one that fails. Also, try saving the data through vb .net itself, instead of using an update sql statement - one should not work better than the other, but I'm curious if that would work.
Finally, post the exception and post the exact text that should have updated the memo field when the exception occurred. I could then test it on my system to see what I experience.
HTH,
Bernie Yaeger
"Stephen" <St******@xjohnstontrading.com> wrote in message news:O6**************@TK2MSFTNGP11.phx.gbl... > Greetings all > > I have a form that reads a access memo field. I can query the
database to > get the info in the memo field without a problem...but when i try to > update > the data i get a exception. The text in the memo field can be large.
It > seens to throw the exception only when large amounts of data is being > updated. The following is the update code : rtNotes is a richtext > textbox.. > any help will be appreciated > Dim mNotes As String = rtNotes.Text & String.Empty '' > > sqlStatement = "update master set Cust_Notes = ' " & mNotes & " '
where > str(trim(MasterId)) = " & _ > > "' " & Trim(glbLookup) & " '" > > SetUpDataBase() > > Try > > cmd.ExecuteNonQuery() > > Catch Ex As Exception > > MsgBox(Ex.ToString) > > End Try > > btnSave.Enabled = False > > With Label6 > > .Text = "Locked" > > .ForeColor = Color.Black > > End With > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jerome |
last post by:
Hi, I'm a bit confused ... when would I rather write an database
application using MS Access and Visual Basic and when (and why) would I
rather write it using Visual Studio .Net?
Is it as easy...
|
by: bill |
last post by:
I am trying to convince a client that dotNet is preferable to an Access
project (ADP/ADE).
This client currently has a large, pure Access MDB solution with 30+ users,
which needs to be upgraded....
|
by: Dave |
last post by:
Hello NG,
Regarding access-declarations and member using-declarations as used to
change the access level of an inherited base member...
Two things need to be considered when determining an...
|
by: Simon Bailey |
last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have
a very simplified knowledge of databases overall. I would very much
appreciate a (simplifed) message explaining the advantages...
|
by: Frederick Noronha \(FN\) |
last post by:
---------- Forwarded message ----------
Solutions to Everyday User Interface and Programming Problems
O'Reilly Releases "Access Cookbook, Second Edition"
Sebastopol, CA--Neither reference book...
|
by: Olav.NET |
last post by:
I am a .NET/C++ developer who is supposed to do some work with Access.
I do not know much about it except for the DB part.
Questions:
*1*
I am looking for INTENSIVE books to get quickly up to...
|
by: John |
last post by:
Hi
What future does access have after the release of vs 2005/sql 2005? MS
doesn't seem to have done anything major with access lately and presumably
hoping that everyone migrates to vs/sql.
...
|
by: com |
last post by:
Extreme Web Reports 2005 - Soft30.com
The wizard scans the specified MS Access database and records
information such
as report names, parameters and subqueries. ......
|
by: Mell via AccessMonster.com |
last post by:
Is there a way to find out where an application was created from?
i.e. - work or home
i.e. - if application sits on a (work) server/network, the IT people know the
application is sitting...
|
by: jasmith |
last post by:
How will Access fair in a year? Two years? .... The new version of
Access seems to service non programmers as a wizard interface to
quickly create databases via a fancy wizard. Furthermore, why...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |