Re: How to get Unique columns and Primary key constraints using SqlConnection.GetSchema() Programming Software Development by kvprajapati Welcome waleed_cs2000, GetSchema() Method return a DataTable instance. Use "IndexColumns" argument to list the primary key meta info. [CODE=C#] var lst = dc.Connection.GetSchema("IndexColumns") ; [/CODE] Re: How to get Unique columns and Primary key constraints using SqlConnection.GetSchema() Programming Software Development by waleed_cs2000 [QUOTE=adatapost;917116]Welcome waleed_cs2000, GetSchema() Method return a DataTable instance. Use "IndexColumns" argument … primary key meta info. [CODE=C#] var lst = dc.Connection.GetSchema("IndexColumns") ; [/CODE][/QUOTE] thanks a lot , that helped… OledbConnection.getschema Programming Software Development by NewVBguy Hi there, I'm a newbie in .net. Can somebody show me a complete working code on how to make this getschema work. I am planning to use it in getting all the tablenames/querries inside an MS Access database and put them in a combo box. thnx in advance.... Newvbguy How to get Unique columns and Primary key constraints using SqlConnection.GetSchema() Programming Software Development by waleed_cs2000 hi I have some code of ADO.net to dynamically detect the database schema, [B]what I need is how to get Unique columns constraints and Primary key constraints using SqlConnection GetSchema() method.[/B] thanks Problem getting database schema info Programming Software Development by BlueNoteMan …// Open Connection cn.Open(); //DataTable schemaInfo = cn.GetSchema(); // available schemas //foreach (DataRow row in schemaInfo.Rows…string schema = (string)row[0]; // DataTable t = cn.GetSchema(schema); // Form f = new ShowDataForm(t, schema); //… Display Excel data in a DataGridView Programming Software Development by djjeavons …Get all worksheet names from the Excel file selected using GetSchema of an OleDbConnection string sourceConnectionString = String.Format(@"… connection = new OleDbConnection(sourceConnectionString); connection.Open(); DataTable tables = connection.GetSchema("Tables", new String[] { null, null, null, "… Re: Problem getting database schema info Programming Software Development by lolafuertes When you cn.GetSchema() you are retrieving the metadata info, not the tables info. … give you the collection names you can retrieve using cm.GetSchema(CollectionName). You must enumerate the results in order to obtain…/ms254969(v=VS.80).aspx"]there[/URL] for the GetSchema() common and specifics. Hope this helps. Multiple combobxes in one form Programming Web Development by david081 …([String].Empty, conn) conn.Open() ComboBox2.DataSource = conn.GetSchema("TABLES") ComboBox2.ValueMember = "TABLE_NAME"…ComboBox2.DisplayMember = "TABLE_NAME" ComboBox1.DataSource = conn.GetSchema("TABLES") ComboBox1.ValueMember = "TABLE_NAME"… Insert into two tables using two comboboxes Programming Software Development by david081 …([String].Empty, conn) conn.Open() ComboBox2.DataSource = conn.GetSchema("TABLES") ComboBox2.ValueMember = "TABLE_NAME"…ComboBox2.DisplayMember = "TABLE_NAME" ComboBox1.DataSource = conn.GetSchema("TABLES") ComboBox1.ValueMember = "TABLE_NAME"… Re: Insert into two tables using two comboboxes Programming Software Development by Oxiegen …;TABLES")[/ICODE] into this: [ICODE]conn.GetSchema("Tables", New String() {Nothing, Nothing, "TABLE"}[/… Plot a chart from imported excel Programming Software Development by naz1234 … all worksheet names from the Excel file selected using GetSchema of an OleDbConnection Dim sourceConnectionString As String = [String… OleDbConnection(sourceConnectionString) connection.Open() Dim tables As DataTable = connection.GetSchema("Tables", New [String]() {Nothing, Nothing, Nothing,… Re: Listing Tables From SQL Server 2008 Programming Software Development by Momerath First, why are you using an OleDBConnection to connect to Sql Server? Use SqlConnection for better performance and features. Second, your call to GetSchema is requesting something odd, you just need to say SqlConnection.GetSchema() oledb database update problem Programming Software Development by Raged …) As DataSet connection.ConnectionString = connString 'Dim tbl As DataTable = cn.GetSchema("Tables") sql = "select * from " + table DAHospital… From Excel to Eccess db in one click event Programming Software Development by TobbeK ….OleDb.OleDbConnection(connectString); myConnection.Open(); //Get SheetNames DataTable sheetTable = myConnection.GetSchema("Tables"); DataRow rowSheetName = sheetTable.Rows[0]; String sheetName… Re: From Excel to Eccess db in one click event Programming Software Development by TobbeK ….OleDbConnection(connectString); myConnection.Open(); //Hämta SheetNames DataTable sheetTable = myConnection.GetSchema("Tables"); DataRow rowSheetName = sheetTable.Rows[0]; String sheetName… Re: From Excel to Eccess db in one click event Programming Software Development by TobbeK ….OleDb.OleDbConnection(connectString); myConnection.Open(); //Get SheetNames DataTable sheetTable = myConnection.GetSchema("Tables"); DataRow rowSheetName = sheetTable.Rows[0]; String sheetName… Re: From Excel to Eccess db in one click event Programming Software Development by TobbeK ….OleDb.OleDbConnection(connectString); myConnection.Open(); //Get SheetNames DataTable sheetTable = myConnection.GetSchema("Tables"); DataRow rowSheetName = sheetTable.Rows[0]; String sheetName… Re: From Excel to Eccess db in one click event Programming Software Development by kvprajapati … System.Data.OleDb.OleDbConnection(connectString); myConnection.Open(); DataTable sheetTable = myConnection.GetSchema("Tables"); myDataSet = new System.Data.DataSet(); foreach (DataRow… Re: From Excel to Eccess db in one click event Programming Software Development by TobbeK ….OleDb.OleDbConnection(excelConnectString); myConnection.Open(); //Get SheetNames DataTable sheetTable = myConnection.GetSchema("Tables"); DataRow rowSheetName = sheetTable.Rows[0]; sheetName = rowSheetName… Object reference not set to an instance of an object Programming Software Development by tendaimare …() kom.Connection = kon Dim dTable As DataTable Try dTable = kon.GetSchema(SchemaType.Mapped, New Object() {Nothing, Nothing, Nothing, "TABLE"… Re: Object reference not set to an instance of an object Programming Software Development by tendaimare … As New DataTable '<<< here Try dTable = kon.GetSchema(SchemaType.Mapped, New Object() {Nothing, Nothing, Nothing, "TABLE"… Re: Object reference not set to an instance of an object Programming Software Development by Unhnd_Exception … Dim str() As String = Nothing Try Con.Open() dTable = Con.GetSchema("TABLES") If dTable.Rows.Count > 0 Then… Re: Object reference not set to an instance of an object Programming Software Development by Unhnd_Exception … you were getting the first problem to begin with. Your getSchema parameters are incorrect. Setting a break point in the catch… All column names in a table Programming Software Development by tendaimare … iam stuck can onyone help?GetOLedbSchema can be turned to getschema but when it comes to OleDbSchemaGuid i do not know… Listing Tables From SQL Server 2008 Programming Software Development by Behseini …; integrated security = sspi;"); cn.Open(); DataTable MyTable; MyTable = cn.GetSchema(System.Data.SqlClient.SqlClientMetaDataCollectionNames.Tables.ToString()); for (int i = 0… Re: Listing Tables From SQL Server 2008 Programming Software Development by Behseini … = .\\WorkShop; integrated security = sspi;"; connection.Open(); { DataTable table = connection.GetSchema("Tables"); foreach (DataRow tab in table.Rows) listBox1… Re: Listing Tables From SQL Server 2008 Programming Software Development by Behseini …;Initial Catalog={0}", databaseName); connection.Open(); { DataTable table = connection.GetSchema("Tables"); foreach (DataRow tab in table.Rows) listBox1… create new DataBase & fill with another DataBase Programming Software Development by as_khoshtip ….FileName; OleDbCommand cmd = new OleDbCommand(); cn.Open(); DataTable table = cn.GetSchema("Tables"); int i = 0; foreach (System.Data.DataRow… Hi all. I'm new, have a project and having a hard time where to start. Plea Programming Software Development by cbt13 … like this using these Libraries? http://api.steampowered.com/IEconItems_440/GetSchema/v0001/?key=6D52161D23855A4E3319B63ED165272E Or is there any way else to… Populate gridview from dropdown selected table Programming Web Development by Josefo1 ….DropDownList1.ValueMember = "TABLE_NAME" Me.DropDownList1.DataSource = Me.con.GetSchema("TABLES", New String() {Nothing, Nothing, Nothing, "TABLE…