从 Postgres 数据库填充 vb.net 中的树视图
用于从 SQL Server 数据库填充树视图的 vb.net 代码在以下链接中给出: http://support.microsoft.com/kb/320755
我尝试了上面给出的代码链接来解决我的问题,但我无法更改 Postgres 数据库的 SQL Sever 代码。
我想使用 vb.net 和数据库 Postgres 做同样的事情。
The vb.net code for populating tree view from the SQL Server Database is given in following link:
http://support.microsoft.com/kb/320755
I tried the code given in the above link to solve my problem but I was unable to change the code of SQL Sever for Postgres Database.
I want to do the same thing using vb.net and database Postgres.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您未能告诉我们到底什么不适合您,但我猜测是该示例中使用的非标准 SQL。
从 SQL 语句中删除“括号引用”,它应该在 PostgreSQL 上运行良好
Select * from [Order Details]
对于 PostgreSQL(以及除 SQL Server 之外的所有其他 DBMS)来说是无效的 SQL更改表的名称例如
order_details
然后你可以运行SELECT * FROM order_details
省略方括号当然,连接字符串也需要更改(但我无能为力你在那里,因为我不懂 VisualBasic)
You failed to tell us what exactly is not working for your, but my guess is the non-standard SQL that is used in that example.
Remove the "bracket quoting" from the SQL Statements, and it should run fine on PostgreSQL
Select * from [Order Details]
is invalid SQL for PostgreSQL (and every other DBMS except SQL Server)Change the table's name to e.g.
order_details
and then you can runSELECT * FROM order_details
leaving out the square bracketsAnd of course, the connection string needs to be changed as well (but I cannot help you there as I don't know VisualBasic)