Re: SQL Confusion in DA.Fill()
- From: "Christopher Weaver" <we.aver@xxxxxxxxxxx>
- Date: Fri, 20 May 2005 08:32:12 -0700
I see your point, but 'tblTasks' is the literal name of the table on the
back end.
"Earl" <brikshoe@xxxxxxxxxxxxxxxxx> wrote in message
news:O4kYRrPXFHA.3996@xxxxxxxxxxxxxxxxxxxxxxx
> Wouldn't it be:
>
> "SELECT * FROM \" + tblTasks + "\ ORDER BY " + OrderBy;
>
> "Christopher Weaver" <we.aver@xxxxxxxxxxx> wrote in message
> news:O0i2FSKXFHA.1044@xxxxxxxxxxxxxxxxxxxxxxx
>> The SQL that I'm sending to my server doesn't work unless I run it
>> through an interactive tool.
>>
>> I've done this in VS 2003
>> cmd.CommandText = "SELECT * FROM \"tblTasks\" ORDER BY " + OrderBy;
>> odbcDA_TaskActivities.SelectCommand = cmd;
>> MessageBox.Show(cmd.CommandText);
>> dsTaskActivities.Clear();
>> odbcDA_TaskActivities.Fill(dsTaskActivities, "Tasks");
>>
>> The Fill method fails whenever OrderBy contains more than one field. For
>> example, this works in the ISQL window of my DBMS controller:
>> SELECT * FROM "tblTasks" ORDER BY "AssignTo", "DueDate", "Category",
>> "SubCategory"
>>
>> It is also the exact text shown in the MessageBox.Show window from the
>> line before the Fill call in my code when OrderBy is set to
>> "AssignTo", "DueDate", "Category", "SubCategory" .
>>
>> But I still get a non-specific system error. When I set OrderBy to
>> "uidTask" or "Description" the Fill call fills the DataSet.
>>
>> Any ideas on this?
>>
>
>
.
- References:
- SQL Confusion in DA.Fill()
- From: Christopher Weaver
- Re: SQL Confusion in DA.Fill()
- From: Earl
- SQL Confusion in DA.Fill()
- Prev by Date: Re: How to get past an error?
- Next by Date: Re: how to retrieve identity (Any OleDb Provider)
- Previous by thread: Re: SQL Confusion in DA.Fill()
- Next by thread: Re: SQL Confusion in DA.Fill()
- Index(es):
Relevant Pages
|