|
-
Sep 27th, 2000, 09:39 AM
#1
Thread Starter
Junior Member
This it the sql statment
sqlTemp = "INSERT INTO tCallLog (IndexNumber, LoggedBy, ForConsultant, Client, Person, Timelogged, DateLogged, Notes, Urgent, Priority, WasRespondedTo) VALUES ( MAX('IndexNumber') + 1, '" & CurrentUser.username & "', '" & cmbConsultant.Text & "', '" & txtClient.Text & "', '" & txtPerson.Text & "', '" & txtTimeLogged.Text & "', '" & Format(Now, "dd/mm/yyyy") & "' , '" & Chr(35) & txtNotes.Text & Chr(35) & "', " & chkUrgent.Value & ", '" & cmbPriority.ListIndex & "', " & chkWasRespondedTo.Value & " );"
ok ... table:
IndexNumber int
LoggedBy char
ForConsultant char
Client varchar
Person varchar
TimeLogged text
DateLogged text
Notes text (in vb multiline textbox)
Urgent int
Priority int
WasRespondedTo int
please help the error i keep getting is:
"Implicit Conversion from datatype 'varchar' to 'int' is not allowed. Use the CONVERT function to run this query."
but i cant find what is causing the error!
-
Sep 27th, 2000, 10:11 AM
#2
Lively Member
text instead of a INT
One of the fields* you are trying to insert is a text instead of a INT
*
IndexNumber int
Urgent int
Priority int
WasRespondedTo int
Good luck,
Fedor
-
Sep 27th, 2000, 10:18 AM
#3
Thread Starter
Junior Member
I know about the int fields and the text is being passed to sql at explicit not as strings. i have used the same type of passing variables in other sql queries and it worked. I think it has something to do with the date and time.
Thankx for the help.
-
Sep 27th, 2000, 10:50 AM
#4
Addicted Member
I think it's "Priority" because it's an INT and you have INSERTED it with ' '. If you want to insert the listindex, don't use the ' '... and it will work fine I hope !!!
-
Sep 27th, 2000, 11:11 AM
#5
Thread Starter
Junior Member
Thankx Man, that looks like the problem. Sometimes it just helps to have someone else look at it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|