 |
05-16-2008, 01:25 PM
|
|
|
Didn't he quit?..again?
Character: Phukerbut
Server: kel'thuzad
Posts: 2,091
|
SQL halp plxplx
something here is messed up.
It's not pulling any data so im getting table0 not found ect.
I think its something with the format of the sql but i can't see it =\
Quote:
/// <summary>
/// StreetRangeSearch
/// </summary>
private void StreetRangeSearch()
{
this.SearchSQLString = @" SELECT
[StreetName],
[SRange],
[ERange],
[City],
[State],
[Zip],
[County],
[WardE],
[WardO],
[RowRank] from (
SELECT distinct
[tblStreetRanges].[StreetName],
[tblStreetRanges].[SRange],
[tblStreetRanges].[ERange],
[tblStreetRanges].[City],
[tblStreetRanges].[State],
[tblStreetRanges].[Zip],
[tblStreetRanges].[County],
[tblStreetRanges].[WardE],
[tblStreetRanges].[WardO]
";
this.WhereString = " WHERE tblStreetRanges.DepartmentId = '" + CurrentMemberStore.DepartmentId + "' ";
this.FromString = @" FROM tblStreetRanges with (NoLock) ";
//Add in any columns that need to be changed to public access.
//this.PublicWebPath = new string[] { "DocumentThumbnailLink" };
DataSet dsSQLSearchColumns = new DataSet();
DataTable dtSQLSearchColumns = BuildSearchColumnsTable();
|
__________________
|
|
|
05-16-2008, 01:45 PM
|
|
|
-------------------
Character: Devastatin
Guild: Revelations
Server: Unrest
Posts: 1,795
|
Re: SQL halp plxplx
Quote:
Originally Posted by Lamil
something here is messed up.
It's not pulling any data so im getting table0 not found ect.
I think its something with the format of the sql but i can't see it =\
|
PHP Code:
/// <summary>
/// StreetRangeSearch
/// </summary>
private void StreetRangeSearch()
{
this.SearchSQLString = @" SELECT
[StreetName],
[SRange],
[ERange],
[City],
[State],
[Zip],
[County],
[WardE],
[WardO],
[RowRank] from ( <------- HERE IS THE START ONE
SELECT distinct
[tblStreetRanges].[StreetName],
[tblStreetRanges].[SRange],
[tblStreetRanges].[ERange],
[tblStreetRanges].[City],
[tblStreetRanges].[State],
[tblStreetRanges].[Zip],
[tblStreetRanges].[County],
[tblStreetRanges].[WardE],
[tblStreetRanges].[WardO]
";
this.WhereString = " WHERE tblStreetRanges.DepartmentId = '" + CurrentMemberStore.DepartmentId + "' ";
this.FromString = @" FROM tblStreetRanges with (NoLock) ";
//Add in any columns that need to be changed to public access.
//this.PublicWebPath = new string[] { "DocumentThumbnailLink" };
DataSet dsSQLSearchColumns = new DataSet();
DataTable dtSQLSearchColumns = BuildSearchColumnsTable();
Your missing the ending )
Also, its seems that you screwed up a couple places, or i don't know what the hell your trying to do.
Last edited by Johnathon; 05-16-2008 at 01:47 PM.
|
|
|
05-16-2008, 01:47 PM
|
|
|
Niber FTL
Character: Stryph
Guild: Imperium
Server: Permafrost
Posts: 339
|
Re: SQL halp plxplx
Check the DataSet. Doesn't it tell you when you get the error on what line the error is occuring?
i.e. System.Data.DataTableCollection.get_Item(Int32 index) +107
|
|
|
05-16-2008, 03:33 PM
|
|
|
Didn't he quit?..again?
Character: Phukerbut
Server: kel'thuzad
Posts: 2,091
|
Re: SQL halp plxplx
i figured it out. it wanted a date. and i didnt have one. and i forgot to say somewhere else that im not sorting by a date
changed a " " to a "-1" and its all betterrs

__________________
Last edited by Lamil; 05-16-2008 at 03:34 PM.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|