Sean
|
| Posted: 06/02/2002, 2:33 PM |
|
Hello All,
I'm building a test project with CCS B5 and am having difficulties with both dates and booleans using a connection to a MS Access database.
Booleans:
Access appears to store booleans as Yes/No. This doesn't appear to be an option in CCS. I've tried changing the checked and unchecked values to Yes and No (which generates an undefined variable error, which I've even tried fixing by hand in the code with no success). I've also tried editing the connections boolean format, also with no luck. If I try to update a record I get a syntax error in update statement. This could be related to something else in the statement... but the booleans stand out as clearly wrong.
Dates:
I need to do a search on a date field. When I attempt this I get a data type mismatch. I have again played with most of the settings, format, dbformat, etc. After reviewing the site and a note about codecharge it appears related to access needing a # before and after the date. I have yet to figure out how to make this happen.
I was under the impression that this product was regularly used with access, so I'm hoping that I'm just really missing something rather than the support for access just being really poor. Any help much appreciated!!!
Sean
|
|
|
 |
Sean
|
| Posted: 06/02/2002, 2:51 PM |
|
P.S. I'm using ASP 3.0 with templates to an IIS server
|
|
|
 |
Sean
|
| Posted: 06/02/2002, 5:01 PM |
|
I resolved the Date problem by changing the ToSQL funtion in the Access Connection Class in common.asp as follows:
Function ToSQL(Value, ValueType)
If CStr(Value) = "" OR IsEmpty(Value) Then
ToSQL = "Null"
Else
If ValueType = ccsInteger or ValueType = ccsFloat Then
ToSQL = Replace(Value, ",", ".")
ElseIf ValueType = ccsDate Then
ToSQL = "#" & Replace(Value, "'", "''") & "#"
Else
ToSQL = "'" & Replace(Value, "'", "''") & "'"
End If
End If
End Function
Still haven't resolved the boolean issue... however, it is not as described previously. The update error was unrelated. The only issue with booleans now is that I can't get the checkbox to display the current setting.
|
|
|
 |
|