|
-
Apr 9th, 2003, 05:40 PM
#1
Thread Starter
Sleep mode
aaaah I'm going insane ![Resolved]
What's wrong with this sql statement ??
VB Code:
Dim Updater As String = "UPDATE " & MyTable & "SET C_URL='" & _
str1 & "'" & " C_category='" & str2 & "'" & " C_language='" & str3 _
& "'" & " C_USERNAME='" & str4 & "'" & " C_PASSWORD='" & str5 _
& "'" & " C_TIME='" & str6 & "'" & " C_DATE='" & str7 & "'" & " _
C_RATING='" & str8 & "'" & " C_COMMENT='" & str9 & "'" & " _
WHERE C_URL='" & str1 & "'"
Last edited by Pirate; Apr 9th, 2003 at 07:00 PM.
-
Apr 9th, 2003, 05:44 PM
#2
You need to put a space before SET for one.
-
Apr 9th, 2003, 05:45 PM
#3
Addicted Member
"UPDATE " & MyTable & "SET
Put a space before SET and after MyTable
-
Apr 9th, 2003, 05:47 PM
#4
Thread Starter
Sleep mode
Actually there's a space but I forgot to include it here . Sorry to tell you , it won't work either .
-
Apr 9th, 2003, 05:50 PM
#5
Thread Starter
Sleep mode
I should've told the error it throws : "Missing Operator" . It looks fine but don't know that's wrong in here .
-
Apr 9th, 2003, 06:02 PM
#6
Addicted Member
You don't have any commas in there.
It should be like Update myTable SET fieldA = valueA, fieldB = valueB, fieldC = valueC where fieldD = valudD
-
Apr 9th, 2003, 06:04 PM
#7
Thread Starter
Sleep mode
No need to have commas in SQL Str.I'm sure
-
Apr 9th, 2003, 06:33 PM
#8
In a SET statement that sets multiple values you do.
-
Apr 9th, 2003, 06:36 PM
#9
Thread Starter
Sleep mode
do what ? Umm ? What're you talking about!!!!!
-
Apr 9th, 2003, 06:39 PM
#10
Thread Starter
Sleep mode
btw , Don't you think field names are sensitive ??
-
Apr 9th, 2003, 06:41 PM
#11
PowerPoster
Dim Updater As String = "UPDATE " & MyTable & " SET C_URL='" & _
str1 & "'," & " C_category='" & str2 & "'," & " C_language='" & str3 _
& "'," & " C_USERNAME='" & str4 & "'," & " C_PASSWORD='" & str5 _
& "'," & " C_TIME='" & str6 & "'," & " C_DATE='" & str7 & "'," & " _
C_RATING='" & str8 & "'," & " C_COMMENT='" & str9 & "'" & " _
WHERE C_URL='" & str1 & "'"
-
Apr 9th, 2003, 06:48 PM
#12
Thread Starter
Sleep mode
hellswraith what did you add . No more errors but it isn't updating my db !
-
Apr 9th, 2003, 06:51 PM
#13
Thread Starter
Sleep mode
I c , so the magic in commas .How come ? . I remember I've tried like that but without commas .
-
Apr 9th, 2003, 06:54 PM
#14
Thread Starter
Sleep mode
Thanks hellswraith . Now everything is fixed !
-
Apr 9th, 2003, 06:58 PM
#15
Thread Starter
Sleep mode
Originally posted by Shurijo
You don't have any commas in there.
It should be like Update myTable SET fieldA = valueA, fieldB = valueB, fieldC = valueC where fieldD = valudD
That's right .thanks
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
|