无效的对象名称'information_schema.columns'。 [英] Invalid object name 'information_schema.columns'.

查看:937
本文介绍了无效的对象名称'information_schema.columns'。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

con2.Open();
                    string query = "SELECT column_name FROM information_schema.columns where table_name = '" + str + "' order by ordinal_position";
                    SqlDataAdapter mydata = new SqlDataAdapter(query, con2);
                    mydata.Fill(ds1, str);





error无效的对象名称'information_schema.columns'。我该怎么做帮助



error Invalid object name 'information_schema.columns'. what i do pls help

推荐答案

数据库有一个区分大小写的排序规则,尝试所有大写的INFORMATION_SCHEMA.COLUMNS。或者您没有权限。



生成实际查询并在调试时获取它并在此处发布,如果这没有帮助。



[请接受/投票给你的答案或解决方案以鼓励他人]
The database has a case-sensitive collation, try all upper case INFORMATION_SCHEMA.COLUMNS. Or you don't have permission.

Generate the actual query and fetch it at debug time and post it here if that doesn't help.

[Please accept/up-vote answers or solutions that work for you to encourage others]


string query = "SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS where table_name = '" + str + "' order by ordinal_position";





更改资本问题中的INFORMATION_SCHEMA.COLUMNS解决方法谢谢



change the INFORMATION_SCHEMA.COLUMNS in capital problem solve thank you


这篇关于无效的对象名称'information_schema.columns'。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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