navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Type mismatch: '[string: " "]' Error

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Type mismatch: '[string: " "]' Error
Page: [1]
 
lyners

 

Posts: 93
Joined: 7/25/2003
Status: offline

 
Type mismatch: '[string: " "]' Error - 9/8/2003 14:43:22   
I am unsure why I am getting this error (Type mismatch: '[string: " "]' Error) on this line (line 324);

      <td align="right" height="19"><font size="1"><%=FP_FieldVal(fp_rs,"Expenditures/Expenses") + FP_FieldVal(fp_rs,"Expenses")%><%runningTotalExpenditures = runningTotalExpenditures + FP_FieldVal(fp_rs,"Expenditures/Expenses") + FP_FieldVal(fp_rs,"Expenses")%><%runningFundTotalExpenditures = runningFundTotalExpenditures + FP_FieldVal(fp_rs,"Expenditures/Expenses") + FP_FieldVal(fp_rs,"Expenses")%><%runningAgencyTotalExpenditures = runningAgencyTotalExpenditures + FP_FieldVal(fp_rs,"Expenditures/Expenses") + FP_FieldVal(fp_rs,"Expenses")%>
        </font></td>


I have a few theories:
1. You cannot add database fields together within a statement like this.
2. It is 547 characters long and I have exceeded some type of parameter on the server that creates the page.
3. I am missing an obvious error.

Any comment that will help me overcome this, would be appreciated.

Thanks, Lyners
Spooky

 

Posts: 26597
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 15:47:34   
Are you trying to divide fields within a function? "Expenditures/Expenses" or is that a column name?
If FP_FieldVal() is blank, itll return a &nbsp; (which of course cant be numerical!) so use FP_Field()

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to lyners)
lyners

 

Posts: 93
Joined: 7/25/2003
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 16:33:05   
Spooky, you must live, eat, sleep, and dream about code. That seems to be the problem. I fixed that part with your suggestion :), now I have this error coming in;

Unterminated string constant
line 313, column 53 :)

The code for line 313 looks like this:
      <td align="right" height="19"><font size="1"><%=FP_Field(fp_rs,"Encumbrances") + FP_Field(fp_rs,"Pre-encumbrances")%><%runningTotalEncumbrances = runningTotalEncumbrances + FP_Field(fp_rs,"Encumbrances") + FP_Field(fp_rs,"Pre-encumbrances")%><%runningFundTotalEncumbrances = runningFundTotalEncumbrances + FP_Field(fp_rs,"Encumbrances") + FP_Field(fp_rs,"Pre-encumbrances")%><%runningAgencyTotalEncumbrances = runningAgencyTotalEncumbrances + FP_Field(fp_rs,"Encumbrances") + FP_Field(fp_rs,"Pre-encumbrances")%></font></td>


It's right at the <%= spot. Any Ideas?

Also, I am not trying to divide fields in the above code (previous question). The users named the field that, so thus that is what I am stuck using.

Thanks for the quick response.

Lyners

(in reply to lyners)
Spooky

 

Posts: 26597
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 16:42:02   
Try this format to clarify where the error is :

<td align="right" height="19"><font size="1">

<%
DIM tmpEncumbrances , tmpPreEncumbrances 
tmpEncumbrances = FP_Field(fp_rs,"Encumbrances") 
tmpPreEncumbrances = FP_Field(fp_rs,"Pre-encumbrances")
%>

<%=tmpEncumbrances + tmpPreEncumbrances %>

<%runningTotalEncumbrances = runningTotalEncumbrances + tmpEncumbrances + tmpPreEncumbrances %>
<%runningFundTotalEncumbrances = runningFundTotalEncumbrances + tmpEncumbrances + tmpPreEncumbrances %>
<%runningAgencyTotalEncumbrances = runningAgencyTotalEncumbrances + tmpEncumbrances + tmpPreEncumbrances %>

</font></td>


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to lyners)
lyners

 

Posts: 93
Joined: 7/25/2003
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 17:12:20   
Thanks Spooky, I found an article in the Microsoft Knowledgebase stating that you cannot use reserve characters in field names:

http://support.microsoft.com/default.aspx?scid=kb;en-us;265317

The dash (-) was not one of the characters, but I got rid of it anyway. I changed my query so that the name of the field is now preencumbrance, but I am still getting this error:

Unterminated string constant
line 313, column 53

It is pointing at nothing now because I changed my code to how you formatted it. I'm confused now.

Just to summarize,
1. I have removed / and - from my field names.
2. I formatted the code into Spooky's format above to debug.

It's probably something easy, I know I'm getting closer.

Here is a copy of my code now starting at line 311 (2 before the error):

      <td align="right" height="19"><font size="1"><%=FP_Field(fp_rs,"ExpendituresExpenses") + FP_Field(fp_rs,"Expenses")%><%runningTotalExpenditures = runningTotalExpenditures + FP_Field(fp_rs,"ExpendituresExpenses") + FP_Field(fp_rs,"Expenses")%><%runningFundTotalExpenditures = runningFundTotalExpenditures + FP_Field(fp_rs,"ExpendituresExpenses") + FP_Field(fp_rs,"Expenses")%><%runningAgencyTotalExpenditures = runningAgencyTotalExpenditures + FP_Field(fp_rs,"ExpendituresExpenses") + FP_Field(fp_rs,"Expenses")%></font></td>
      <%strline = strline & FP_Field(fp_rs,"ExpendituresExpenses") + FP_FieldVal(fp_rs,"Expenses") & chr(9)%>
td align="right" height="19"><font size="1">

<%
DIM tmpEncumbrances , tmpPreEncumbrances 
tmpEncumbrances = FP_Field(fp_rs,"Encumbrances") 
tmpPreEncumbrances = FP_Field(fp_rs,"Preencumbrances")
%>

<%=tmpEncumbrances + tmpPreEncumbrances %>

<%runningTotalEncumbrances = runningTotalEncumbrances + tmpEncumbrances + tmpPreEncumbrances %>
<%runningFundTotalEncumbrances = runningFundTotalEncumbrances + tmpEncumbrances + tmpPreEncumbrances %>
<%runningAgencyTotalEncumbrances = runningAgencyTotalEncumbrances + tmpEncumbrances + tmpPreEncumbrances %>

</font></td>


Any Other suggestions?

Lyners

(in reply to lyners)
Spooky

 

Posts: 26597
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 17:18:57   
Is that a server or client side error?
It actually sounds like a JS error, so that would be the output html line, not the asp source code.

If its client side, the error will appear in a popup window.

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to lyners)
lyners

 

Posts: 93
Joined: 7/25/2003
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 17:21:09   
Server Side

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Error Type:
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
WebPage.asp, line 313, column 53

(in reply to lyners)
Spooky

 

Posts: 26597
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 17:26:41   
What are you trying to do with this?

FP_FieldVal(fp_rs,"Expenses") & chr(9)

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to lyners)
lyners

 

Posts: 93
Joined: 7/25/2003
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 17:41:27   
I am creating an excel spreadsheet as I create the table in the page (for downloading. I move the value into strline, and then add a [TAB] (chr(9)) between fields. I didn't change the FP_fieldval in the other lines, because I wasn't having problems with them.

I have gone through the database table, where the data is coming from, all values seem to be good now (we had some blanks, prior to this), but I still am getting the same error on the same line.

I'll keep working it. Thanks for the quick responses.

Lyners

(in reply to lyners)
Spooky

 

Posts: 26597
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 17:50:22   
<%strline = strline & (FP_Field(fp_rs,"ExpendituresExpenses") + FP_FieldVal(fp_rs,"Expenses")) & chr(9)%>

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to lyners)
lyners

 

Posts: 93
Joined: 7/25/2003
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 17:57:18   
Did it, still no dice. Stubborn little error. Still researching and trying different things.

Lyners

(in reply to lyners)
Spooky

 

Posts: 26597
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 18:02:23   
If "expense" can be null, I would make sure you use Fp_Field() for that line too.

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to lyners)
lyners

 

Posts: 93
Joined: 7/25/2003
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/8/2003 18:09:44   
Roger that.

I commented out the expenditure and encumbrance lines, only to get the same error. I am now narrowing down where my error is at by breaking apart my code. I will keep you posted.

Thanks,
Lyners

(in reply to lyners)
lyners

 

Posts: 93
Joined: 7/25/2003
Status: offline

 
RE: Type mismatch: '[string: " "]' Error - 9/9/2003 10:43:34   
Ahhhhh, figured it out. In a line prior to the above code, I had an FP_Field(fp_rs,"field_name) without the quote ("). Like I said, it was an easy problem that was right in front of my face.

Thanks Spooky for helping me out. Now on to finishing this page!

:)

(in reply to lyners)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Type mismatch: '[string: " "]' Error
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts