muppetgrrl
Programmer
I can't have zero-length strings in a field (it's a checkbox that should read yes or no) and it worked before, but now it's not, and I can't figure out why. When I response.write the SQL statement, it shows that the string is 'No' but when I execute, it says it's a zero-length string. Gah!
Here's the SQL statement. It's saying that the field "ARCandidate" is zero-length, when it clearly isn't. (See boldface):
----------------------
INSERT INTO commdata(DateEdited,ProjectName,Location,State,StateOther,LeadOffice,SecondLeadOffice,ClientContact,PrimaryContact,SecondaryContacts,FWSigRating,
PracticeArea,DateOpening,Description,StoryStatus,StoryNotes,StoryNextSteps,StoryFWCContact,DatePhotography,PermissionsStatus,ImageStatus,
ImageType,Photographer,ARDate,BookDate,DialogueDate,WebDate,PressBookingDate,ARCandidate,BookCandidate,DialogueCandidate,WebCandidate,PressCandidate,
AwardsCandidate,AwardsWon) SELECT '02/18/2005' AS DateEdited ,
'New Project' AS ProjectName , '' AS Location , ' ' AS State ,
'' AS StateOther , ' ' AS LeadOffice , ' ' AS SecondLeadOffice ,
'' AS ClientContact , '' AS PrimaryContact , '' AS SecondaryContacts ,
' ' AS FWSigRating , ' ' AS PracticeArea , '' AS DateOpening ,
'' AS Description , 'Complete' AS StoryStatus , '' AS StoryNotes ,
'' AS StoryNextSteps , '' AS StoryFWCContact , '' AS DatePhotography ,
'Unknown' AS PermissionsStatus , 'Unknown' AS ImageStatus , 'Unknown' AS ImageType , '' AS Photographer ,
'' AS ARDate , '' AS BookDate , '' AS DialogueDate , '' AS WebDate ,
'New Award' AS AwardsWon, '' AS PressBookingDate,
'No' AS ARCandidate , 'No' AS BookCandidate , 'No' AS DialogueCandidate ,
'No' AS WebCandidate , 'No' AS PressCandidate , 'No' AS AwardsCandidate;
-------------
Here's the asp programming:
-----------------------------------
strSQL = "INSERT INTO commdata" _
& "(DateEdited,ProjectName,Location,State,StateOther,LeadOffice,SecondLeadOffice,ClientContact,PrimaryContact,SecondaryContacts,FWSigRating,PracticeArea,DateOpening,
Description,StoryStatus,StoryNotes,StoryNextSteps,StoryFWCContact,DatePhotography,PermissionsStatus,ImageStatus,ImageType,Photographer,ARDate,BookDate,DialogueDate,WebDate,
PressBookingDate,ARCandidate,BookCandidate,DialogueCandidate,WebCandidate,PressCandidate,AwardsCandidate,AwardsWon) " _
& "SELECT '" & strDateEdited & "' AS DateEdited , '" _
& strProjectName & "' AS ProjectName , '" _
& strLocation & "' AS Location , '" _
& strState & "' AS State , '" _
& strStateOther & "' AS StateOther , '" _
& strLeadOffice & "' AS LeadOffice , '" _
& strSecondLeadOffice & "' AS SecondLeadOffice , '" _
& strClientContact & "' AS ClientContact , '" _
& strPrimaryContact & "' AS PrimaryContact , '" _
& strSecondaryContacts & "' AS SecondaryContacts , '" _
& strFWSigRating & "' AS FWSigRating , '" _
& strPracticeArea & "' AS PracticeArea , '" _
& strDateOpening & "' AS DateOpening , '" _
& strDescription & "' AS Description , '" _
& strStoryStatus & "' AS StoryStatus , '" _
& strStoryNotes & "' AS StoryNotes , '" _
& strStoryNextSteps & "' AS StoryNextSteps , '" _
& strStoryFWCContact & "' AS StoryFWCContact , '" _
& strDatePhotography & "' AS DatePhotography , '" _
& strPermissionsStatus & "' AS PermissionsStatus , '" _
& strImageStatus & "' AS ImageStatus , '" _
& strImageType & "' AS ImageType , '" _
& strPhotographer & "' AS Photographer , '" _
& strARDate & "' AS ARDate , '" _
& strBookDate & "' AS BookDate , '" _
& strDialogueDate & "' AS DialogueDate , '" _
& strWebDate & "' AS WebDate , '" _
& strAwardsWon & "' AS AwardsWon, '" _
& strPressBookingDate & "' AS PressBookingDate, '" _
& strARCandidate & "' AS ARCandidate , '" _
& strBookCandidate & "' AS BookCandidate , '" _
& strDialogueCandidate & "' AS DialogueCandidate , '" _
& strWebCandidate & "' AS WebCandidate , '" _
& strPressCandidate & "' AS PressCandidate , '" _
& strAwardsCandidate & "' AS AwardsCandidate;"
---------------------
Anyone have any ideas? I'm tearing out my hair here.
Here's the SQL statement. It's saying that the field "ARCandidate" is zero-length, when it clearly isn't. (See boldface):
----------------------
INSERT INTO commdata(DateEdited,ProjectName,Location,State,StateOther,LeadOffice,SecondLeadOffice,ClientContact,PrimaryContact,SecondaryContacts,FWSigRating,
PracticeArea,DateOpening,Description,StoryStatus,StoryNotes,StoryNextSteps,StoryFWCContact,DatePhotography,PermissionsStatus,ImageStatus,
ImageType,Photographer,ARDate,BookDate,DialogueDate,WebDate,PressBookingDate,ARCandidate,BookCandidate,DialogueCandidate,WebCandidate,PressCandidate,
AwardsCandidate,AwardsWon) SELECT '02/18/2005' AS DateEdited ,
'New Project' AS ProjectName , '' AS Location , ' ' AS State ,
'' AS StateOther , ' ' AS LeadOffice , ' ' AS SecondLeadOffice ,
'' AS ClientContact , '' AS PrimaryContact , '' AS SecondaryContacts ,
' ' AS FWSigRating , ' ' AS PracticeArea , '' AS DateOpening ,
'' AS Description , 'Complete' AS StoryStatus , '' AS StoryNotes ,
'' AS StoryNextSteps , '' AS StoryFWCContact , '' AS DatePhotography ,
'Unknown' AS PermissionsStatus , 'Unknown' AS ImageStatus , 'Unknown' AS ImageType , '' AS Photographer ,
'' AS ARDate , '' AS BookDate , '' AS DialogueDate , '' AS WebDate ,
'New Award' AS AwardsWon, '' AS PressBookingDate,
'No' AS ARCandidate , 'No' AS BookCandidate , 'No' AS DialogueCandidate ,
'No' AS WebCandidate , 'No' AS PressCandidate , 'No' AS AwardsCandidate;
-------------
Here's the asp programming:
-----------------------------------
strSQL = "INSERT INTO commdata" _
& "(DateEdited,ProjectName,Location,State,StateOther,LeadOffice,SecondLeadOffice,ClientContact,PrimaryContact,SecondaryContacts,FWSigRating,PracticeArea,DateOpening,
Description,StoryStatus,StoryNotes,StoryNextSteps,StoryFWCContact,DatePhotography,PermissionsStatus,ImageStatus,ImageType,Photographer,ARDate,BookDate,DialogueDate,WebDate,
PressBookingDate,ARCandidate,BookCandidate,DialogueCandidate,WebCandidate,PressCandidate,AwardsCandidate,AwardsWon) " _
& "SELECT '" & strDateEdited & "' AS DateEdited , '" _
& strProjectName & "' AS ProjectName , '" _
& strLocation & "' AS Location , '" _
& strState & "' AS State , '" _
& strStateOther & "' AS StateOther , '" _
& strLeadOffice & "' AS LeadOffice , '" _
& strSecondLeadOffice & "' AS SecondLeadOffice , '" _
& strClientContact & "' AS ClientContact , '" _
& strPrimaryContact & "' AS PrimaryContact , '" _
& strSecondaryContacts & "' AS SecondaryContacts , '" _
& strFWSigRating & "' AS FWSigRating , '" _
& strPracticeArea & "' AS PracticeArea , '" _
& strDateOpening & "' AS DateOpening , '" _
& strDescription & "' AS Description , '" _
& strStoryStatus & "' AS StoryStatus , '" _
& strStoryNotes & "' AS StoryNotes , '" _
& strStoryNextSteps & "' AS StoryNextSteps , '" _
& strStoryFWCContact & "' AS StoryFWCContact , '" _
& strDatePhotography & "' AS DatePhotography , '" _
& strPermissionsStatus & "' AS PermissionsStatus , '" _
& strImageStatus & "' AS ImageStatus , '" _
& strImageType & "' AS ImageType , '" _
& strPhotographer & "' AS Photographer , '" _
& strARDate & "' AS ARDate , '" _
& strBookDate & "' AS BookDate , '" _
& strDialogueDate & "' AS DialogueDate , '" _
& strWebDate & "' AS WebDate , '" _
& strAwardsWon & "' AS AwardsWon, '" _
& strPressBookingDate & "' AS PressBookingDate, '" _
& strARCandidate & "' AS ARCandidate , '" _
& strBookCandidate & "' AS BookCandidate , '" _
& strDialogueCandidate & "' AS DialogueCandidate , '" _
& strWebCandidate & "' AS WebCandidate , '" _
& strPressCandidate & "' AS PressCandidate , '" _
& strAwardsCandidate & "' AS AwardsCandidate;"
---------------------
Anyone have any ideas? I'm tearing out my hair here.