通过VB.net中的Listview访问SQL Server [英] Access to SQL Server via Listview in VB.net

查看:117
本文介绍了通过VB.net中的Listview访问SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要根据Listview中选择的字段将MS-Access表发送到SQL Server数据库.
1)到目前为止,我已经能够在列表视图中获取Access表名称及其字段.
2)我能够从VB.Net检查数据库是否存在以及SQL Server中是否存在同名表.

现在我不知道如何将基于ListView中所选字段的访问表插入到SQL Server中.

请帮助

I am required to send MS-Access table to SQL Server Database, based on fields Selected in Listview.
1)Till now i am able to get Access table names and their field in List view.
2)I am able to check whether database exists and Whether table exists in SQL Server with same name from VB.Net.

Now i don''t know how to insert Access Tables based in Fields Selected in ListView to SQL Server

Please Help

推荐答案

关于插入数据,我将开始阅读 ^ ].

如果使用动态SQL,则最好使用sql参数来防止 SQL注入 [
With regards to inserting data I would start reading this Inserting Data by using SQL parameters[^].

if using dynamic SQL you are best using sql parameters to protect against SQL injection [^]


这篇关于通过VB.net中的Listview访问SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆