Saturday, March 24, 2012
Please help : System.Data.OleDb.OleDbException: Syntax error i
n name as well, I know you didn't use it here but I had to find out the hard
way. It will cause the same type of error. The Jet Provider is picky abou
t those kinds of words
"Marina" wrote:
> I believe 'password' is a keyword - but it is also your column name. Try
> putting [ and ] around the column name.
> Alsok you shouldn't just concatenate strings together given to you by the
> user. They could easily put in malicious SQL for one of those values. I
> would recommend using parameters.
> "Joe" <Joe@dotnet.itags.org.discussions.microsoft.com> wrote in message
> news:46E04C27-2E28-4AF8-B67B-B4492B7F2298@dotnet.itags.org.microsoft.com...
> cannot get rid of error message,
> as what could be wrong. The SQL string looks fine because I pasted the
> resulting SQL in to MS Access. When I ran the Insert query, it properly
> added the record in the Access DB.
> ResponseEncoding="iso-8859-1" %>
> "http://www.w3.org/TR/html4/loose.dtd">
> source='E:/Inetpub/databases/investors.mdb'")
> again.")
> = 0) Then
> address2, city, prov, country, postal, phone, mobilePhone, AddDate,Investo
r,
> RemoteIP
> company, street_address, address2, city, state, country, postal, phone,
> mobile, AddDate, Inv, RemoteIP)" & _
> last_name & "', '" & company & "', '" & street_address & "', '" & address2
&
> "', '" & city & "', '" & prov & "', '" & country & "', '" & postal & "', '
"
> & phone & "', '" & mobilePhone & "', '" & AddDate & "', '" & Investor & "'
,
> '" & RemoteIP & "')"
>
>Thanx guys after I put [] around password, AddDate and RemoteIP, the script
worked.
Joe
"Tampa .NET Koder" wrote:
> Yep..that got me a few times. Also Joe, be careful of using Date as a col
umn name as well, I know you didn't use it here but I had to find out the ha
rd way. It will cause the same type of error. The Jet Provider is picky ab
out those kinds of words
> "Marina" wrote:
>
Wednesday, March 21, 2012
Please help me how to do this - Urgent
I need to merge some of the rows in the datagrid in asp.net 1.1 with
comma separator.For example i have column name Filed_by which list the
customer's full name.Now i need to merge all the customer name cells
into single cell seperated by comma. Please let me know how can i do
that.Also if you have some example that would be great.
Thanks,
VishnuAssuming you cant merge your values in SQL, you can probably iterate the
dataset / datatable in a loop, pick out the values and glue them together or
you could probably just use a templatecolumn and merge the columns that way
As an iteration example this might get you started:
ArrayList s = new ArrayList();
foreach (DataRow myDataRow in myDataSet.Tables["Customers"].Rows)
{
s.Add(myDataRow["filed_by"].ToString() +
myDataRow["full_name"].ToString());
}
Then bind that to your datagrid as shown here
/url]
Regards
John Timney (MVP)
VISIT MY WEBSITE:
[url]http://www.johntimney.com" target="_blank">http://www.johntimney.com/blog/defa...johntimney.com
http://www.johntimney.com/blog
<settyv@.gmail.com> wrote in message
news:1163098102.821494.319230@.k70g2000cwa.googlegroups.com...
> Hi,
> I need to merge some of the rows in the datagrid in asp.net 1.1 with
> comma separator.For example i have column name Filed_by which list the
> customer's full name.Now i need to merge all the customer name cells
> into single cell seperated by comma. Please let me know how can i do
> that.Also if you have some example that would be great.
>
> Thanks,
> Vishnu
>
Please help me how to do this - Urgent
I need to merge some of the rows in the datagrid in asp.net 1.1 with
comma separator.For example i have column name Filed_by which list the
customer's full name.Now i need to merge all the customer name cells
into single cell seperated by comma. Please let me know how can i do
that.Also if you have some example that would be great.
Thanks,
VishnuAssuming you cant merge your values in SQL, you can probably iterate the
dataset / datatable in a loop, pick out the values and glue them together or
you could probably just use a templatecolumn and merge the columns that way
As an iteration example this might get you started:
ArrayList s = new ArrayList();
foreach (DataRow myDataRow in myDataSet.Tables["Customers"].Rows)
{
s.Add(myDataRow["filed_by"].ToString() +
myDataRow["full_name"].ToString());
}
Then bind that to your datagrid as shown here
http://www.johntimney.com/blog/defa...e3-95c3f29a8a8a
--
Regards
John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
http://www.johntimney.com/blog
<settyv@.gmail.comwrote in message
news:1163098102.821494.319230@.k70g2000cwa.googlegr oups.com...
Quote:
Originally Posted by
Hi,
>
I need to merge some of the rows in the datagrid in asp.net 1.1 with
comma separator.For example i have column name Filed_by which list the
customer's full name.Now i need to merge all the customer name cells
into single cell seperated by comma. Please let me know how can i do
that.Also if you have some example that would be great.
>
>
Thanks,
Vishnu
>