Home > database >  Data window control can connect the data table name is change
Data window control can connect the data table name is change

Time:10-10

As title, such as student a built a table, called a student b b table, landing different students come in to see is the his form,

CodePudding user response:

1. Add fields to distinguish different student
2. Add user, mode is the default user dbo can build other users, mode
Student a. A
Student b. B

CodePudding user response:

Thank you, again I ask, I use the SQL code to add images
"Updateblob question_bank
The set part drawing=: lb_picture
Where qid=: sle_1. Text;
If the sqlca. Sqlcode<> 0 then
Messagebox (" prompt ", "update data error", stopsign! , ok!
Return
End the if
"Then after the run can't successful update picture is how to return a responsibility?
In that column of "detail drawings" I choose the format is varbinary, is my choice in the right column type of problem? If is to choose what kind?

CodePudding user response:

Part drawing the field type with image, varbinary data type up to 8000 bytes of variable-length binary data storage; Estimation is you picture beyond varbinary length limit cannot be saved;

CodePudding user response:

reference qq_17847881 reply: 3/f
part drawing the field type with image, varbinary data type up to 8000 bytes of variable-length binary data storage; Estimation is you picture beyond varbinary length limit cannot be saved;

But I didn't find the image in the datatype types ah, I am using version 12.6

CodePudding user response:

I mean you save the file database field type, SQL server to use the image, the oracle's words with blob, other such as baidu to see will be know

CodePudding user response:

In oracle before LONG RAW type,
First to save files line read out as a blob of variables, and then updateblob to the database,

CodePudding user response:

I try to use the update of the following statements are not added, but the program reminded me syntax error, how to see all don't see a problem, seek help from you
If the exists (select qid
The from question_bank
Where parts name=: sle_2. Text)
The update question_bank set qid=: sle_1. Text, parts name=: sle_2. Text, materials=: sle_3. Text, blank weight=: sle_4. Text, blank type=: sle_5. Text, part drawing=: lb_picture;
Updateblob question_bank set part drawing=: lb_picture where qid=: sle_1. Text;
The else

Insert into question_bank (qid, name of parts, materials, weight of blank, blank, detail drawings)
Values (: sle_1. Text: sle_2. Text, : sle_3. Text, : sle_4. Text, : sle_5. Text, : lb_picture);

Updateblob question_bank set part drawing=: lb_picture where qid=: sle_1. Text;

End the if
If the sqlca. Sqlcode=0 then
Messagebox (" prompt ", "update data success", the Exclamation! , ok!

The else
Messagebox (" prompt ", "update data error", stopsign! , ok!

Return

end if

CodePudding user response:

1, update question_bank set qid=: sle_1. Text, parts name=: sle_2. Text, materials=: sle_3. Text, blank weight=: sle_4. Text, blank type=: sle_5. Text, part drawing=: lb_picture;
To:
The update question_bank set qid=: sle_1. Text, parts name=: sle_2. Text, materials=: sle_3. Text, blank weight=: sle_4. Text, blank type=: sle_5. Text;
Question: update statement without the where condition???

2, insert into question_bank (qid, part name, material, weight of blank, blank, detail drawings)
Values (: sle_1. Text: sle_2. Text, : sle_3. Text, : sle_4. Text, : sle_5. Text, : lb_picture);
To:
Insert into question_bank (qid, name of parts, materials, weight of blank, blank type)
Values (: sle_1. Text: sle_2. Text, : sle_3. Text, : sle_4. Text, : sle_5. The text;
  • Related