By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,669 Members | 2,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,669 IT Pros & Developers. It's quick & easy.

Field value shifting to right by one place each time I am saving d

P: n/a
Hi,
This is a strange problem I am encountering. I have a asp page with a
confirmation.asp page that saves data to a table. There are few text fields
that are captured by the confirmation page as
l_f_name = Request.Form("txt_Name")
l_f_personstitle = Request.Form("txt_Title")
l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode")
l_f_Phone1 = Request.Form("txt_Phone1")
l_f_Phone2 = Request.Form("txt_Phone2")
l_f_Date = Request.Form("txt_Date")

while the same confirmation page updates the data in a database where the
sql statement is

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
" & _
", tblGMISExpenditures_Quarter.Name= ' " & l_f_Name & " ' " & _
", tblGMISExpenditures_Quarter.Title= ' " & l_f_personstitle & "
' " & _
", tblGMISExpenditures_Quarter.AreaCode= ' " & l_f_PhoneAreaCode
& " ' " & _
", tblGMISExpenditures_Quarter.Phone1= ' " & l_f_Phone1 & " ' "
& _
", tblGMISExpenditures_Quarter.Phone2= ' " & l_f_Phone2 & " ' "
& _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

Now, why after saving the data, for the stated fields, data is shifting in
the right by one space? Looking for some resolution and cause. Thanks in
advance. Regards.
Jul 22 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
Could be that the form fields are adding a blank somewhere when you display
the form.

Try trimming the data as in:

Trim(Request.Form("txt_Name"))

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
Hi,
This is a strange problem I am encountering. I have a asp page with a
confirmation.asp page that saves data to a table. There are few text
fields
that are captured by the confirmation page as
l_f_name = Request.Form("txt_Name")
l_f_personstitle = Request.Form("txt_Title")
l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode")
l_f_Phone1 = Request.Form("txt_Phone1")
l_f_Phone2 = Request.Form("txt_Phone2")
l_f_Date = Request.Form("txt_Date")

while the same confirmation page updates the data in a database where the
sql statement is

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
" & _
", tblGMISExpenditures_Quarter.Name= ' " & l_f_Name & " ' " & _
", tblGMISExpenditures_Quarter.Title= ' " & l_f_personstitle & "
' " & _
", tblGMISExpenditures_Quarter.AreaCode= ' " & l_f_PhoneAreaCode
& " ' " & _
", tblGMISExpenditures_Quarter.Phone1= ' " & l_f_Phone1 & " ' "
& _
", tblGMISExpenditures_Quarter.Phone2= ' " & l_f_Phone2 & " ' "
& _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

Now, why after saving the data, for the stated fields, data is shifting in
the right by one space? Looking for some resolution and cause. Thanks in
advance. Regards.

Jul 22 '05 #2

P: n/a
tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
should be
tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "'

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
Hi,
This is a strange problem I am encountering. I have a asp page with a
confirmation.asp page that saves data to a table. There are few text
fields
that are captured by the confirmation page as
l_f_name = Request.Form("txt_Name")
l_f_personstitle = Request.Form("txt_Title")
l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode")
l_f_Phone1 = Request.Form("txt_Phone1")
l_f_Phone2 = Request.Form("txt_Phone2")
l_f_Date = Request.Form("txt_Date")

while the same confirmation page updates the data in a database where the
sql statement is

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
" & _
", tblGMISExpenditures_Quarter.Name= ' " & l_f_Name & " ' " & _
", tblGMISExpenditures_Quarter.Title= ' " & l_f_personstitle & "
' " & _
", tblGMISExpenditures_Quarter.AreaCode= ' " & l_f_PhoneAreaCode
& " ' " & _
", tblGMISExpenditures_Quarter.Phone1= ' " & l_f_Phone1 & " ' "
& _
", tblGMISExpenditures_Quarter.Phone2= ' " & l_f_Phone2 & " ' "
& _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

Now, why after saving the data, for the stated fields, data is shifting in
the right by one space? Looking for some resolution and cause. Thanks in
advance. Regards.

Jul 22 '05 #3

P: n/a
Thanks for the advise Mark. I appreciate it. Now, after doing a trim command
to each of the text field capture, the problem is solved. However, still I am
finding that in each of the text field, there is one space left and then the
data starts filling in. At least, this time the shifting data problem is
solved. However, I am wondering in spite of trim function applied, why should
be there one space and then data in both form and the database table. Any
further thoughts. Thanks. Regards.

"Mark Schupp" wrote:
Could be that the form fields are adding a blank somewhere when you display
the form.

Try trimming the data as in:

Trim(Request.Form("txt_Name"))

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
Hi,
This is a strange problem I am encountering. I have a asp page with a
confirmation.asp page that saves data to a table. There are few text
fields
that are captured by the confirmation page as
l_f_name = Request.Form("txt_Name")
l_f_personstitle = Request.Form("txt_Title")
l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode")
l_f_Phone1 = Request.Form("txt_Phone1")
l_f_Phone2 = Request.Form("txt_Phone2")
l_f_Date = Request.Form("txt_Date")

while the same confirmation page updates the data in a database where the
sql statement is

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
" & _
", tblGMISExpenditures_Quarter.Name= ' " & l_f_Name & " ' " & _
", tblGMISExpenditures_Quarter.Title= ' " & l_f_personstitle & "
' " & _
", tblGMISExpenditures_Quarter.AreaCode= ' " & l_f_PhoneAreaCode
& " ' " & _
", tblGMISExpenditures_Quarter.Phone1= ' " & l_f_Phone1 & " ' "
& _
", tblGMISExpenditures_Quarter.Phone2= ' " & l_f_Phone2 & " ' "
& _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

Now, why after saving the data, for the stated fields, data is shifting in
the right by one space? Looking for some resolution and cause. Thanks in
advance. Regards.


Jul 22 '05 #4

P: n/a
Thanks Curt for your reply. Let me check whether this change can do the
trick. Regards.

"Curt_C [MVP]" wrote:
tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
should be
tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "'

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
Hi,
This is a strange problem I am encountering. I have a asp page with a
confirmation.asp page that saves data to a table. There are few text
fields
that are captured by the confirmation page as
l_f_name = Request.Form("txt_Name")
l_f_personstitle = Request.Form("txt_Title")
l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode")
l_f_Phone1 = Request.Form("txt_Phone1")
l_f_Phone2 = Request.Form("txt_Phone2")
l_f_Date = Request.Form("txt_Date")

while the same confirmation page updates the data in a database where the
sql statement is

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
" & _
", tblGMISExpenditures_Quarter.Name= ' " & l_f_Name & " ' " & _
", tblGMISExpenditures_Quarter.Title= ' " & l_f_personstitle & "
' " & _
", tblGMISExpenditures_Quarter.AreaCode= ' " & l_f_PhoneAreaCode
& " ' " & _
", tblGMISExpenditures_Quarter.Phone1= ' " & l_f_Phone1 & " ' "
& _
", tblGMISExpenditures_Quarter.Phone2= ' " & l_f_Phone2 & " ' "
& _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

Now, why after saving the data, for the stated fields, data is shifting in
the right by one space? Looking for some resolution and cause. Thanks in
advance. Regards.


Jul 22 '05 #5

P: n/a
Jack wrote:
I am wondering in spite of trim function applied, why should be
there one space and then data in both form and the database table.


This can happen if there is whitespace in the source HTML. Two scenarios:

<input type="text" value=" <%=MyVar%> ">
<textarea><%=MyVar%>
</textarea>

In the text input case, the whitespace is fairly clear. With a textarea,
it's not quite as obvious. View source on the confirmation page and see
what's there.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #6

P: n/a
After testing, I find that it works now. However, I forgot to tell that
remarks is a memo field in access. In spite of implementing the change the
field seems to leave one space before adding data. Is this common with a memo
field? Thanks for your help.

"Jack" wrote:
Thanks Curt for your reply. Let me check whether this change can do the
trick. Regards.

"Curt_C [MVP]" wrote:
tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
should be
tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "'

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:63**********************************@microsof t.com...
Hi,
This is a strange problem I am encountering. I have a asp page with a
confirmation.asp page that saves data to a table. There are few text
fields
that are captured by the confirmation page as
l_f_name = Request.Form("txt_Name")
l_f_personstitle = Request.Form("txt_Title")
l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode")
l_f_Phone1 = Request.Form("txt_Phone1")
l_f_Phone2 = Request.Form("txt_Phone2")
l_f_Date = Request.Form("txt_Date")

while the same confirmation page updates the data in a database where the
sql statement is

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
" & _
", tblGMISExpenditures_Quarter.Name= ' " & l_f_Name & " ' " & _
", tblGMISExpenditures_Quarter.Title= ' " & l_f_personstitle & "
' " & _
", tblGMISExpenditures_Quarter.AreaCode= ' " & l_f_PhoneAreaCode
& " ' " & _
", tblGMISExpenditures_Quarter.Phone1= ' " & l_f_Phone1 & " ' "
& _
", tblGMISExpenditures_Quarter.Phone2= ' " & l_f_Phone2 & " ' "
& _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

Now, why after saving the data, for the stated fields, data is shifting in
the right by one space? Looking for some resolution and cause. Thanks in
advance. Regards.


Jul 22 '05 #7

P: n/a
Hi Dave,
Thanks for your advise. I got the anwer from Curt, well almost. Stil the
remark field is not trimming the leading space(one). Do you think, memo field
does throw in one space before the data? Thanks.

"Dave Anderson" wrote:
Jack wrote:
I am wondering in spite of trim function applied, why should be
there one space and then data in both form and the database table.


This can happen if there is whitespace in the source HTML. Two scenarios:

<input type="text" value=" <%=MyVar%> ">
<textarea><%=MyVar%>

Jul 22 '05 #8

P: n/a
you sure its the data and not the way you are displaying it?
And no, it shouldn't ever happen "automatically"

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
After testing, I find that it works now. However, I forgot to tell that
remarks is a memo field in access. In spite of implementing the change the
field seems to leave one space before adding data. Is this common with a
memo
field? Thanks for your help.

"Jack" wrote:
Thanks Curt for your reply. Let me check whether this change can do the
trick. Regards.

"Curt_C [MVP]" wrote:
> tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
> should be
> tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "'
>
> --
> Curt Christianson
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Jack" <Ja**@discussions.microsoft.com> wrote in message
> news:63**********************************@microsof t.com...
> > Hi,
> > This is a strange problem I am encountering. I have a asp page with a
> > confirmation.asp page that saves data to a table. There are few text
> > fields
> > that are captured by the confirmation page as
> > l_f_name = Request.Form("txt_Name")
> > l_f_personstitle = Request.Form("txt_Title")
> > l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode")
> > l_f_Phone1 = Request.Form("txt_Phone1")
> > l_f_Phone2 = Request.Form("txt_Phone2")
> > l_f_Date = Request.Form("txt_Date")
> >
> > while the same confirmation page updates the data in a database where
> > the
> > sql statement is
> >
> >
> >
> > strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
> > tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "'
> > " & _
> > ", tblGMISExpenditures_Quarter.LocalShare= '" &
> > l_CurrentLocalShareOutlay & "' " & _
> > ", tblGMISExpenditures_Quarter.MBCCShare= '" &
> > l_c_MBCCShareOfOutlay & "' " & _
> > ", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
> > l_CurrentUnpaidObligations & "' " & _
> > ", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
> > l_CurrentLocalShareUnpaidObligations & "' " & _
> > ", tblGMISExpenditures_Quarter.ProjectIncome= '" &
> > l_CurrentOtherProjectIncomeReceived & "' " & _
> > ", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
> > l_CurrentForfeitureIncomeReceived & "' " & _
> > ", tblGMISExpenditures_Quarter.OtherExpense= '" &
> > l_CurrentOtherProjectIncomeExpenditures & "' " & _
> > ", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
> > l_CurrentForfeitureIncomeExpenditures & "' " & _
> > ", tblGMISExpenditures_Quarter.InterestReceived= '" &
> > l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
> > ", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
> > l_p_c_TotalOutlay & "' " & _
> > ", tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & "
> > '
> > " & _
> > ", tblGMISExpenditures_Quarter.Name= ' " & l_f_Name & " ' " &
> > _
> > ", tblGMISExpenditures_Quarter.Title= ' " & l_f_personstitle &
> > "
> > ' " & _
> > ", tblGMISExpenditures_Quarter.AreaCode= ' " &
> > l_f_PhoneAreaCode
> > & " ' " & _
> > ", tblGMISExpenditures_Quarter.Phone1= ' " & l_f_Phone1 & " '
> > "
> > & _
> > ", tblGMISExpenditures_Quarter.Phone2= ' " & l_f_Phone2 & " '
> > "
> > & _
> > ", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
> > " where " & _
> > " tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"
> >
> > Now, why after saving the data, for the stated fields, data is
> > shifting in
> > the right by one space? Looking for some resolution and cause. Thanks
> > in
> > advance. Regards.
>
>
>

Jul 22 '05 #9

P: n/a
That was my initial assessment. In any event I am going to check it again.
Thanks

"Curt_C [MVP]" wrote:
you sure its the data and not the way you are displaying it?
And no, it shouldn't ever happen "automatically"

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
After testing, I find that it works now. However, I forgot to tell that
remarks is a memo field in access. In spite of implementing the change the
field seems to leave one space before adding data. Is this common with a
memo
field? Thanks for your help.

"Jack" wrote:
Thanks Curt for your reply. Let me check whether this change can do the
trick. Regards.

"Curt_C [MVP]" wrote:

> tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & " '
> should be
> tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "'
>
> --
> Curt Christianson
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Jack" <Ja**@discussions.microsoft.com> wrote in message
> news:63**********************************@microsof t.com...
> > Hi,
> > This is a strange problem I am encountering. I have a asp page with a
> > confirmation.asp page that saves data to a table. There are few text
> > fields
> > that are captured by the confirmation page as
> > l_f_name = Request.Form("txt_Name")
> > l_f_personstitle = Request.Form("txt_Title")
> > l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode")
> > l_f_Phone1 = Request.Form("txt_Phone1")
> > l_f_Phone2 = Request.Form("txt_Phone2")
> > l_f_Date = Request.Form("txt_Date")
> >
> > while the same confirmation page updates the data in a database where
> > the
> > sql statement is
> >
> >
> >
> > strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
> > tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "'
> > " & _
> > ", tblGMISExpenditures_Quarter.LocalShare= '" &
> > l_CurrentLocalShareOutlay & "' " & _
> > ", tblGMISExpenditures_Quarter.MBCCShare= '" &
> > l_c_MBCCShareOfOutlay & "' " & _
> > ", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
> > l_CurrentUnpaidObligations & "' " & _
> > ", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
> > l_CurrentLocalShareUnpaidObligations & "' " & _
> > ", tblGMISExpenditures_Quarter.ProjectIncome= '" &
> > l_CurrentOtherProjectIncomeReceived & "' " & _
> > ", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
> > l_CurrentForfeitureIncomeReceived & "' " & _
> > ", tblGMISExpenditures_Quarter.OtherExpense= '" &
> > l_CurrentOtherProjectIncomeExpenditures & "' " & _
> > ", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
> > l_CurrentForfeitureIncomeExpenditures & "' " & _
> > ", tblGMISExpenditures_Quarter.InterestReceived= '" &
> > l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
> > ", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
> > l_p_c_TotalOutlay & "' " & _
> > ", tblGMISExpenditures_Quarter.Remarks= ' " & l_f_Remarks & "
> > '
> > " & _
> > ", tblGMISExpenditures_Quarter.Name= ' " & l_f_Name & " ' " &
> > _
> > ", tblGMISExpenditures_Quarter.Title= ' " & l_f_personstitle &
> > "
> > ' " & _
> > ", tblGMISExpenditures_Quarter.AreaCode= ' " &
> > l_f_PhoneAreaCode
> > & " ' " & _
> > ", tblGMISExpenditures_Quarter.Phone1= ' " & l_f_Phone1 & " '
> > "
> > & _
> > ", tblGMISExpenditures_Quarter.Phone2= ' " & l_f_Phone2 & " '
> > "
> > & _
> > ", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
> > " where " & _
> > " tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"
> >
> > Now, why after saving the data, for the stated fields, data is
> > shifting in
> > the right by one space? Looking for some resolution and cause. Thanks
> > in
> > advance. Regards.
>
>
>


Jul 22 '05 #10

P: n/a
Jack wrote:
...the remark field is not trimming the leading space(one). Do you
think, memo field does throw in one space before the data? Thanks.


Unless you show us some of the relevant ASP code, we can come up with
speculative reasons for days. Focusing on just one affected field, can you
show the line in your confirmation page that displays that field? How about
the line(s) associated with putting that field into the database?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #11

P: n/a
Dave,
Here is the data capture from the form.
l_f_Remarks = trim(Request.Form("txt_Remarks"))
and here is the corresponding statement for database update. Hope this helps.
Regards

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "' " & _
", tblGMISExpenditures_Quarter.Name= '" & l_f_Name & "' " & _
", tblGMISExpenditures_Quarter.Title= '" & l_f_personstitle & "' "
& _
", tblGMISExpenditures_Quarter.AreaCode= '" & l_f_PhoneAreaCode &
"' " & _
", tblGMISExpenditures_Quarter.Phone1= '" & l_f_Phone1 & "' " & _
", tblGMISExpenditures_Quarter.Phone2= '" & l_f_Phone2 & "' " & _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

"Dave Anderson" wrote:
Jack wrote:
...the remark field is not trimming the leading space(one). Do you
think, memo field does throw in one space before the data? Thanks.


Unless you show us some of the relevant ASP code, we can come up with
speculative reasons for days. Focusing on just one affected field, can you
show the line in your confirmation page that displays that field? How about
the line(s) associated with putting that field into the database?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 22 '05 #12

P: n/a
Jack wrote:
l_f_Remarks = trim(Request.Form("txt_Remarks"))


Have you examined Server.HTMLEncode(l_f_Remarks) ?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #13

P: n/a
Dave, I just tried. However, still the same. Thanks.

"Dave Anderson" wrote:
Jack wrote:
l_f_Remarks = trim(Request.Form("txt_Remarks"))


Have you examined Server.HTMLEncode(l_f_Remarks) ?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 22 '05 #14

P: n/a
Show the code you are using to display the field on the form.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
Dave,
Here is the data capture from the form.
l_f_Remarks = trim(Request.Form("txt_Remarks"))
and here is the corresponding statement for database update. Hope this
helps.
Regards

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "' " & _
", tblGMISExpenditures_Quarter.Name= '" & l_f_Name & "' " & _
", tblGMISExpenditures_Quarter.Title= '" & l_f_personstitle & "' "
& _
", tblGMISExpenditures_Quarter.AreaCode= '" & l_f_PhoneAreaCode &
"' " & _
", tblGMISExpenditures_Quarter.Phone1= '" & l_f_Phone1 & "' " & _
", tblGMISExpenditures_Quarter.Phone2= '" & l_f_Phone2 & "' " & _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

"Dave Anderson" wrote:
Jack wrote:
> ...the remark field is not trimming the leading space(one). Do you
> think, memo field does throw in one space before the data? Thanks.


Unless you show us some of the relevant ASP code, we can come up with
speculative reasons for days. Focusing on just one affected field, can
you
show the line in your confirmation page that displays that field? How
about
the line(s) associated with putting that field into the database?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use
of this email address implies consent to these terms. Please do not
contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 22 '05 #15

P: n/a
Mark, here is the way I am displaying the remarks field. Thanks. Regards.

l_Remarks = RSCurrentExpense.Fields("Remarks")
<textarea rows="9" name="txt_Remarks" cols="106"> <%Response.Write
(trim(l_Remarks))%></textarea>

"Mark Schupp" wrote:
Show the code you are using to display the field on the form.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
Dave,
Here is the data capture from the form.
l_f_Remarks = trim(Request.Form("txt_Remarks"))
and here is the corresponding statement for database update. Hope this
helps.
Regards

strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' " & _
", tblGMISExpenditures_Quarter.LocalShare= '" &
l_CurrentLocalShareOutlay & "' " & _
", tblGMISExpenditures_Quarter.MBCCShare= '" &
l_c_MBCCShareOfOutlay & "' " & _
", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
l_CurrentUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
l_CurrentLocalShareUnpaidObligations & "' " & _
", tblGMISExpenditures_Quarter.ProjectIncome= '" &
l_CurrentOtherProjectIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
l_CurrentForfeitureIncomeReceived & "' " & _
", tblGMISExpenditures_Quarter.OtherExpense= '" &
l_CurrentOtherProjectIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
l_CurrentForfeitureIncomeExpenditures & "' " & _
", tblGMISExpenditures_Quarter.InterestReceived= '" &
l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
l_p_c_TotalOutlay & "' " & _
", tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "' " & _
", tblGMISExpenditures_Quarter.Name= '" & l_f_Name & "' " & _
", tblGMISExpenditures_Quarter.Title= '" & l_f_personstitle & "' "
& _
", tblGMISExpenditures_Quarter.AreaCode= '" & l_f_PhoneAreaCode &
"' " & _
", tblGMISExpenditures_Quarter.Phone1= '" & l_f_Phone1 & "' " & _
", tblGMISExpenditures_Quarter.Phone2= '" & l_f_Phone2 & "' " & _
", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
" where " & _
" tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"

"Dave Anderson" wrote:
Jack wrote:
> ...the remark field is not trimming the leading space(one). Do you
> think, memo field does throw in one space before the data? Thanks.

Unless you show us some of the relevant ASP code, we can come up with
speculative reasons for days. Focusing on just one affected field, can
you
show the line in your confirmation page that displays that field? How
about
the line(s) associated with putting that field into the database?

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use
of this email address implies consent to these terms. Please do not
contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


Jul 22 '05 #16

P: n/a
You have a blank between the <textarea> tag and the response.write.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
Mark, here is the way I am displaying the remarks field. Thanks. Regards.

l_Remarks = RSCurrentExpense.Fields("Remarks")
<textarea rows="9" name="txt_Remarks" cols="106"> <%Response.Write
(trim(l_Remarks))%></textarea>

"Mark Schupp" wrote:
Show the code you are using to display the field on the form.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
> Dave,
> Here is the data capture from the form.
> l_f_Remarks = trim(Request.Form("txt_Remarks"))
> and here is the corresponding statement for database update. Hope this
> helps.
> Regards
>
> strSQL1 = "UPDATE tblGMISExpenditures_Quarter SET
> tblGMISExpenditures_Quarter.CurrentOutlay= '" & l_CurrentOutlay & "' "
> & _
> ", tblGMISExpenditures_Quarter.LocalShare= '" &
> l_CurrentLocalShareOutlay & "' " & _
> ", tblGMISExpenditures_Quarter.MBCCShare= '" &
> l_c_MBCCShareOfOutlay & "' " & _
> ", tblGMISExpenditures_Quarter.UnpaidOblig= '" &
> l_CurrentUnpaidObligations & "' " & _
> ", tblGMISExpenditures_Quarter.LocalShareUnpaidOblig= '" &
> l_CurrentLocalShareUnpaidObligations & "' " & _
> ", tblGMISExpenditures_Quarter.ProjectIncome= '" &
> l_CurrentOtherProjectIncomeReceived & "' " & _
> ", tblGMISExpenditures_Quarter.ForfeitureIncome= '" &
> l_CurrentForfeitureIncomeReceived & "' " & _
> ", tblGMISExpenditures_Quarter.OtherExpense= '" &
> l_CurrentOtherProjectIncomeExpenditures & "' " & _
> ", tblGMISExpenditures_Quarter.ForfeitureExpense= '" &
> l_CurrentForfeitureIncomeExpenditures & "' " & _
> ", tblGMISExpenditures_Quarter.InterestReceived= '" &
> l_CurrentInterestIncomeReceivedOnMBCCFunds & "' " & _
> ", tblGMISExpenditures_Quarter.TotalPeriodOutlay= '" &
> l_p_c_TotalOutlay & "' " & _
> ", tblGMISExpenditures_Quarter.Remarks= '" & l_f_Remarks & "' "
> & _
> ", tblGMISExpenditures_Quarter.Name= '" & l_f_Name & "' " & _
> ", tblGMISExpenditures_Quarter.Title= '" & l_f_personstitle & "'
> "
> & _
> ", tblGMISExpenditures_Quarter.AreaCode= '" & l_f_PhoneAreaCode
> &
> "' " & _
> ", tblGMISExpenditures_Quarter.Phone1= '" & l_f_Phone1 & "' " &
> _
> ", tblGMISExpenditures_Quarter.Phone2= '" & l_f_Phone2 & "' " &
> _
> ", tblGMISExpenditures_Quarter.Date= '" & l_f_Date & "' " & _
> " where " & _
> " tblGMISExpenditures_Quarter.SubgrantIntID = " & GrantID & ";"
>
> "Dave Anderson" wrote:
>
>> Jack wrote:
>> > ...the remark field is not trimming the leading space(one). Do you
>> > think, memo field does throw in one space before the data? Thanks.
>>
>> Unless you show us some of the relevant ASP code, we can come up with
>> speculative reasons for days. Focusing on just one affected field, can
>> you
>> show the line in your confirmation page that displays that field? How
>> about
>> the line(s) associated with putting that field into the database?
>>
>>
>>
>> --
>> Dave Anderson
>>
>> Unsolicited commercial email will be read at a cost of $500 per
>> message.
>> Use
>> of this email address implies consent to these terms. Please do not
>> contact
>> me directly or ask me to contact you directly for assistance. If your
>> question is worth asking, it's worth posting.
>>
>>
>>


Jul 22 '05 #17

P: n/a
Mark, you got it. Now it works perfect. Thanks a lot for your help. Regards.

"Mark Schupp" wrote:
You have a blank between the <textarea> tag and the response.write.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
Mark, here is the way I am displaying the remarks field. Thanks. Regards.

l_Remarks = RSCurrentExpense.Fields("Remarks")
<textarea rows="9" name="txt_Remarks" cols="106"> <%Response.Write
(trim(l_Remarks))%>

Jul 22 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.