Author |
Topic |
jarv
Posting Yak Master
131 Posts |
Posted - 2009-02-03 : 10:24:44
|
I get the error: Data type mismatch in criteria expression.so, I added # instead of ' around the date and I still get the error?!Please helpstrSQL = "INSERT INTO tblFiles (FileName,FileSize,DateUploaded,UploadedBy,Filepath) Values ('"& Upload.UploadedFiles(fileKey).FileName &"',"& Upload.UploadedFiles(fileKey).Length &",#"& Now() & "#,""Admin"",'"& Upload.UploadedFiles(fileKey).FileName &"')" adoCon.Execute(strSQL) |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-03 : 10:32:01
|
check data type of each column and see if you're inserting only allowed value types. |
 |
|
jarv
Posting Yak Master
131 Posts |
Posted - 2009-02-03 : 10:44:45
|
i've debugged and everything seems ok?!INSERT INTO tblFiles (FileName,FileSize,DateUploaded,UploadedBy,Filepath) Values ('index.html','312',#03/02/2009 15:46:47#,"Admin",'index.html') |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-03 : 12:22:34
|
what are datatypes of FileName,FileSize,DateUploaded,UploadedBy,Filepath? |
 |
|
jarv
Posting Yak Master
131 Posts |
Posted - 2009-02-04 : 08:31:53
|
data types? |
 |
|
jarv
Posting Yak Master
131 Posts |
Posted - 2009-02-04 : 08:33:07
|
you mean: FileName = TextFileSize = INTDateUploaded = Date/TimeUploadedBy = TextFilePath = Text |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-04 : 08:40:59
|
Check quotes around ADMIN text.As of now, you are treating admin as a column, not as a value.strSQL = "INSERT INTO tblFiles (FileName,FileSize,DateUploaded,UploadedBy,Filepath) Values ('"& Upload.UploadedFiles(fileKey).FileName &"',"& Upload.UploadedFiles(fileKey).Length &",#"& Now() & "#,"'Admin'",'"& Upload.UploadedFiles(fileKey).FileName &"')"adoCon.Execute(strSQL) E 12°55'05.63"N 56°04'39.26" |
 |
|
jarv
Posting Yak Master
131 Posts |
Posted - 2009-02-04 : 08:45:23
|
I have been trying to insert text into an INT Data typesilly me! |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-04 : 09:13:39
|
yup..i guessed. thats why i told to check them |
 |
|
|