问题描述
我试图在asp.net项目中上传带有文件上传控件的docx文件,然后将其保存在数据库中,我的数据库包含三个相关的表:
File_Table:
FileID是(主键和自动关联)
,FileName,Data
Text_Table:
FileID,文字
Image_table:
FileID,imgID,img
并且文件上传成功并成功存储,但我的外键和主键(FileID)有问题;将Text_Table和Image_table中的FileID存储为Null !!!
我该如何解决这个问题?我可以通过会话方法解决它!!?以及如果是的话!?
任何人都可以帮助我!???
谢谢,
Hi,
I was tried to upload a docx file with file upload control in asp.net project ,and then save it in database , my database contain three related tables :
File_Table :
FileID which is (primary key & auto correlated)
,FileName,Data
Text_Table :
FileID,Text
Image_table:
FileID,imgID,img
and the files were uploaded successfully and stored Successfully, but I have a problem with foreign key and primary key (FileID) ; which the FileID in Text_Table and in Image_table was stored as a Null !!!
how can i solve this issue ? and can i solve it by session method !!? and how if yes!?
can anyone help me please!???
thanks,
推荐答案
这篇关于如何在上传到数据库后获取上传文件的最新文件ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!