将文件扩展名插入数据库

编程入门 行业动态 更新时间:2024-10-21 12:41:52
本文介绍了将文件扩展名插入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

请帮帮我。我知道它只是一个简单的问题,但我如何只插入数据库的文件扩展名?我应该在insert语句中写什么?我想插入一个文件扩展名,如.pdf,.docx等。我已经上传了文件,所以现在我需要将该文件扩展名插入同一个表中的另一个字段。

Please help me. i know its a simple problem only but how do i insert only a file extension to the database? what should i write in the insert statement? i wanna insert a file extension such as .pdf, .docx, etc.. i've already upload the file so now i need to insert that file extension into another field in the same table.

推荐答案

使用以下代码..将变量扩展名的值插入数据库 use the following code.. insert the value of variable extension to the database string extension = System.IO.Path.GetExtension(filename);

更多推荐

将文件扩展名插入数据库

本文发布于:2023-10-13 10:03:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1487643.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件扩展名   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!