| |

VerySource

 Forgot password?
 Register
Search
View: 677|Reply: 4

What's wrong with this INSERT statement

[Copy link]

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-14 18:20:01
| Show all posts |Read mode
Please help the master to see what is wrong with the following INSERT statement:

Sql = "Insert into Art_Info (Title, Content, Author, From, KeyWords) values ​​('"&Title. [Text]&".,'"&Content. [Text]&"','"&StrAuthor&"' , '"&StrFrom&"', '"&StrKeyWords&"') "

For illustration, this statement is to save the input information in the web page text in the access database
Reply

Use magic Report

0

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 United States

Post time: 2020-1-18 15:09:01
| Show all posts
Sql = "Insert into Art_Info (Title, Content, Author, [From], KeyWords) values ​​('"&Title. [Text]&"', '"&Content. [Text]&"', '"&StrAuthor&"','"&StrFrom&"','"&StrKeyWords&"')"


--From is a reserved word in the system, you need to add []
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-18 23:00:01
| Show all posts
thank. . .
Okay. . .
By the way, apart from FROM being a system reserved word, what else is not. . . . .
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-19 16:18:01
| Show all posts
Look at it, it feels like some complete words

You should write a variable name in the future when you write a shorthand for the data type. You don't have to worry about reserved words. . .
Reply

Use magic Report

0

Threads

11

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-2-16 13:00:02
| Show all posts
Sql = "Insert into Art_Info ([Title], [Content], [Author], [From], [KeyWords]) values ​​('"&Title. [Text]&"', '"&Content. [Text]&"','"&StrAuthor&"','"&StrFrom&"','"&StrKeyWords&"')"
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list