![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Content-Class: urn:content-classes:message From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com Subject: SQLTables and SQLColumns Date: Mon, 29 Sep 2003 13:49:47 -0700 Lines: 8 Message-ID: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft CDO for Windows 2000 Thread-Index: AcOGyzhANsblFVGOQKe/8syewQHWFQ== X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Newsgroups: microsoft.public.dotnet.framework.odbcnet Path: cpmsftngxa06.phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.odbcnet:3065 NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160 X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet Hi, I was wondering if it is possible to call SQLTables and SQLColumns for the ODBC classes in .NET. I see a method in the OLE DB classes to get schema information, but I haven't found this in ODBC. Any ideas? |
#3
| |||
| |||
|
|
Content-Class: urn:content-classes:message From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com References: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl M5bQrqyhDHA.2624 (AT) cpmsftngxa06 (DOT) phx.gbl Subject: RE: SQLTables and SQLColumns Date: Tue, 30 Sep 2003 08:21:20 -0700 Lines: 74 Message-ID: <1d6f01c38766$8075bec0$a401280a (AT) phx (DOT) gbl MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft CDO for Windows 2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Thread-Index: AcOHZoBz8DedrM9bRyyCh9hTU0DwVA== Newsgroups: microsoft.public.dotnet.framework.odbcnet Path: cpmsftngxa06.phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.odbcnet:3070 NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164 X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet Kevin, I would like to allow users to view data from external databases inside of my application. To do this, I need to be able to get the data types supported by the database, a list of tables in that database and columns within those tables (names and data types). I want to work with any database that has an OLE DB or ODBC driver. There is a method for OLE DB - OleDbconnection.GetOleDbSchemaTable() that provides lots of schema information for a database. I'm looking for a similar thing in ODBC. I believe this kind of thing is done in ODBC by calling SQLTables and SQLColumns. I'm hoping there is some way to call these methods in ODBC.NET. Thanks, Sandy -----Original Message----- Hi Sandy, I'm not quite sure what you need to do. Are you going to get the table and column information for a database? Can you tell me what's the database system? And which method did find in OLE DB class? Please provide me with more information, so that I can deliver my assistance more quickly. If anything is unclear, please feel free to reply to the post. Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." -------------------- | Content-Class: urn:content-classes:message | From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | Subject: SQLTables and SQLColumns | Date: Mon, 29 Sep 2003 13:49:47 -0700 | Lines: 8 | Message-ID: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl | MIME-Version: 1.0 | Content-Type: text/plain; | charset="iso-8859-1" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | Thread-Index: AcOGyzhANsblFVGOQKe/8syewQHWFQ== | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 | Newsgroups: microsoft.public.dotnet.framework.odbcnet | Path: cpmsftngxa06.phx.gbl | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.odbcnet:3065 | NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160 | X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet | | Hi, | | I was wondering if it is possible to call SQLTables and | SQLColumns for the ODBC classes in .NET. I see a method | in the OLE DB classes to get schema information, but I | haven't found this in ODBC. | | Any ideas? | . |
#4
| |||
| |||
|
|
-----Original Message----- Hi Sandy, There doesn't seems to be a method like GetOleDbSchemaTable in ODBC, because ODBC deal with so many database systems that differs from each other. However, there's a GetSchemaTable method in the OdbcDataReader class to get the column information in a table. If you need to obtain information about tables, I think you can use an adapter to fill the tables to a DataSet, and get some of them from DataSet.Tables property. http://msdn.microsoft.com/library/default.asp? url=/library/en-us/cpref/html/ frlrfsystemdataodbcodbcdatareaderclassgetschematab letopic. asp If anything is unclear, please feel free to reply to the post. Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." -------------------- | Content-Class: urn:content-classes:message | From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | References: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl M5bQrqyhDHA.2624 (AT) cpmsftngxa06 (DOT) phx.gbl | Subject: RE: SQLTables and SQLColumns | Date: Tue, 30 Sep 2003 08:21:20 -0700 | Lines: 74 | Message-ID: <1d6f01c38766$8075bec0$a401280a (AT) phx (DOT) gbl | MIME-Version: 1.0 | Content-Type: text/plain; | charset="iso-8859-1" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 | Thread-Index: AcOHZoBz8DedrM9bRyyCh9hTU0DwVA== | Newsgroups: microsoft.public.dotnet.framework.odbcnet | Path: cpmsftngxa06.phx.gbl | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.odbcnet:3070 | NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164 | X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet | | Kevin, | | I would like to allow users to view data from external | databases inside of my application. To do this, I need to | be able to get the data types supported by the database, a | list of tables in that database and columns within those | tables (names and data types). I want to work with any | database that has an OLE DB or ODBC driver. There is a | method for OLE DB - OleDbconnection.GetOleDbSchemaTable () | that provides lots of schema information for a database. | I'm looking for a similar thing in ODBC. I believe this | kind of thing is done in ODBC by calling SQLTables and | SQLColumns. I'm hoping there is some way to call these | methods in ODBC.NET. | | Thanks, | | Sandy | >-----Original Message----- | >Hi Sandy, | | >I'm not quite sure what you need to do. Are you going to | get the table and | >column information for a database? Can you tell me what's | the database | >system? And which method did find in OLE DB class? Please | provide me with | >more information, so that I can deliver my assistance | more quickly. | | >If anything is unclear, please feel free to reply to the | post. | | >Kevin Yu | >======= | >"This posting is provided "AS IS" with no warranties, and | confers no | >rights." | | >-------------------- | >| Content-Class: urn:content-classes:message | >| From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | >| Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | >| Subject: SQLTables and SQLColumns | >| Date: Mon, 29 Sep 2003 13:49:47 -0700 | >| Lines: 8 | >| Message-ID: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl | >| MIME-Version: 1.0 | >| Content-Type: text/plain; | >| charset="iso-8859-1" | >| Content-Transfer-Encoding: 7bit | >| X-Newsreader: Microsoft CDO for Windows 2000 | >| Thread-Index: AcOGyzhANsblFVGOQKe/8syewQHWFQ== | >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 | >| Newsgroups: microsoft.public.dotnet.framework.odbcnet | >| Path: cpmsftngxa06.phx.gbl | >| Xref: cpmsftngxa06.phx.gbl | microsoft.public.dotnet.framework.odbcnet:3065 | >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160 | >| X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet | >| | >| Hi, | >| | >| I was wondering if it is possible to call SQLTables and | >| SQLColumns for the ODBC classes in .NET. I see a | method | >| in the OLE DB classes to get schema information, but I | >| haven't found this in ODBC. | >| | >| Any ideas? | >| | | >. | | . |
#5
| |||
| |||
|
|
Content-Class: urn:content-classes:message From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com References: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl M5bQrqyhDHA.2624 (AT) cpmsftngxa06 (DOT) phx.gbl |
|
Subject: RE: SQLTables and SQLColumns Date: Thu, 2 Oct 2003 10:06:11 -0700 Lines: 159 Message-ID: <06c601c38907$7b122930$a101280a (AT) phx (DOT) gbl MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft CDO for Windows 2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Thread-Index: AcOJB3sSC7/zNnmkT5y8SZx457u0oQ== Newsgroups: microsoft.public.dotnet.framework.odbcnet Path: cpmsftngxa06.phx.gbl Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.odbcnet:3089 NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet Hi Kevin, GetSchemaTable is exactly what I need for the column information. My only remaining problem is that I need to know the names of all of the tables in the database. I want to show the user a list of table names and let them pick the ones they want to view. Thanks for all of your help, Sandy -----Original Message----- Hi Sandy, There doesn't seems to be a method like GetOleDbSchemaTable in ODBC, because ODBC deal with so many database systems that differs from each other. However, there's a GetSchemaTable method in the OdbcDataReader class to get the column information in a table. If you need to obtain information about tables, I think you can use an adapter to fill the tables to a DataSet, and get some of them from DataSet.Tables property. http://msdn.microsoft.com/library/default.asp? url=/library/en-us/cpref/html/ frlrfsystemdataodbcodbcdatareaderclassgetschematab letopic. asp If anything is unclear, please feel free to reply to the post. Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." -------------------- | Content-Class: urn:content-classes:message | From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | References: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl M5bQrqyhDHA.2624 (AT) cpmsftngxa06 (DOT) phx.gbl | Subject: RE: SQLTables and SQLColumns | Date: Tue, 30 Sep 2003 08:21:20 -0700 | Lines: 74 | Message-ID: <1d6f01c38766$8075bec0$a401280a (AT) phx (DOT) gbl | MIME-Version: 1.0 | Content-Type: text/plain; | charset="iso-8859-1" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 | Thread-Index: AcOHZoBz8DedrM9bRyyCh9hTU0DwVA== | Newsgroups: microsoft.public.dotnet.framework.odbcnet | Path: cpmsftngxa06.phx.gbl | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.odbcnet:3070 | NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164 | X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet | | Kevin, | | I would like to allow users to view data from external | databases inside of my application. To do this, I need to | be able to get the data types supported by the database, a | list of tables in that database and columns within those | tables (names and data types). I want to work with any | database that has an OLE DB or ODBC driver. There is a | method for OLE DB - OleDbconnection.GetOleDbSchemaTable () | that provides lots of schema information for a database. | I'm looking for a similar thing in ODBC. I believe this | kind of thing is done in ODBC by calling SQLTables and | SQLColumns. I'm hoping there is some way to call these | methods in ODBC.NET. | | Thanks, | | Sandy | >-----Original Message----- | >Hi Sandy, | | >I'm not quite sure what you need to do. Are you going to | get the table and | >column information for a database? Can you tell me what's | the database | >system? And which method did find in OLE DB class? Please | provide me with | >more information, so that I can deliver my assistance | more quickly. | | >If anything is unclear, please feel free to reply to the | post. | | >Kevin Yu | >======= | >"This posting is provided "AS IS" with no warranties, and | confers no | >rights." | | >-------------------- | >| Content-Class: urn:content-classes:message | >| From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | >| Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | >| Subject: SQLTables and SQLColumns | >| Date: Mon, 29 Sep 2003 13:49:47 -0700 | >| Lines: 8 | >| Message-ID: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl | >| MIME-Version: 1.0 | >| Content-Type: text/plain; | >| charset="iso-8859-1" | >| Content-Transfer-Encoding: 7bit | >| X-Newsreader: Microsoft CDO for Windows 2000 | >| Thread-Index: AcOGyzhANsblFVGOQKe/8syewQHWFQ== | >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 | >| Newsgroups: microsoft.public.dotnet.framework.odbcnet | >| Path: cpmsftngxa06.phx.gbl | >| Xref: cpmsftngxa06.phx.gbl | microsoft.public.dotnet.framework.odbcnet:3065 | >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160 | >| X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet | >| | >| Hi, | >| | >| I was wondering if it is possible to call SQLTables and | >| SQLColumns for the ODBC classes in .NET. I see a | method | >| in the OLE DB classes to get schema information, but I | >| haven't found this in ODBC. | >| | >| Any ideas? | >| | | >. | | . |
#6
| |||
| |||
|
|
Hi, I was wondering if it is possible to call SQLTables and SQLColumns for the ODBC classes in .NET. I see a method in the OLE DB classes to get schema information, but I haven't found this in ODBC. Any ideas? |
#7
| |||
| |||
|
|
-----Original Message----- Hi Sandy, There doesn't seem to be such a function in ODBC to return all the table names in a database. As I said in my last post, because ODBC deals with so many database systems, and they are different from each other, .NET ODBC Provider might not provide such a method. If anything is unclear, please feel free to reply to the post. Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." -------------------- | Content-Class: urn:content-classes:message | From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | References: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl M5bQrqyhDHA.2624 (AT) cpmsftngxa06 (DOT) phx.gbl 1d6f01c38766$8075bec0$a401280a (AT) phx (DOT) gbl KIACpqIiDHA.688 (AT) cpmsftngxa06 (DOT) phx.gbl | Subject: RE: SQLTables and SQLColumns | Date: Thu, 2 Oct 2003 10:06:11 -0700 | Lines: 159 | Message-ID: <06c601c38907$7b122930$a101280a (AT) phx (DOT) gbl | MIME-Version: 1.0 | Content-Type: text/plain; | charset="iso-8859-1" | Content-Transfer-Encoding: 7bit | X-Newsreader: Microsoft CDO for Windows 2000 | X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 | Thread-Index: AcOJB3sSC7/zNnmkT5y8SZx457u0oQ== | Newsgroups: microsoft.public.dotnet.framework.odbcnet | Path: cpmsftngxa06.phx.gbl | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.odbcnet:3089 | NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161 | X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet | | Hi Kevin, | | GetSchemaTable is exactly what I need for the column | information. My only remaining problem is that I need to | know the names of all of the tables in the database. I | want to show the user a list of table names and let them | pick the ones they want to view. | | Thanks for all of your help, | | Sandy | | >-----Original Message----- | >Hi Sandy, | | >There doesn't seems to be a method like | GetOleDbSchemaTable in ODBC, | >because ODBC deal with so many database systems that | differs from each | >other. However, there's a GetSchemaTable method in the | OdbcDataReader class | >to get the column information in a table. If you need to | obtain information | >about tables, I think you can use an adapter to fill the | tables to a | >DataSet, and get some of them from DataSet.Tables | property. | | >http://msdn.microsoft.com/library/default.asp? | url=/library/en-us/cpref/html/ | frlrfsystemdataodbcodbcdatareaderclassgetschematab letopic. | asp | | >If anything is unclear, please feel free to reply to the | post. | | >Kevin Yu | >======= | >"This posting is provided "AS IS" with no warranties, and | confers no | >rights." | | >-------------------- | >| Content-Class: urn:content-classes:message | >| From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | >| Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | >| References: <292701c386cb$3842a280$a001280a (AT) phx (DOT) gbl | ><M5bQrqyhDHA.2624 (AT) cpmsftngxa06 (DOT) phx.gbl | >| Subject: RE: SQLTables and SQLColumns | >| Date: Tue, 30 Sep 2003 08:21:20 -0700 | >| Lines: 74 | >| Message-ID: <1d6f01c38766$8075bec0$a401280a (AT) phx (DOT) gbl | >| MIME-Version: 1.0 | >| Content-Type: text/plain; | >| charset="iso-8859-1" | >| Content-Transfer-Encoding: 7bit | >| X-Newsreader: Microsoft CDO for Windows 2000 | >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 | >| Thread-Index: AcOHZoBz8DedrM9bRyyCh9hTU0DwVA== | >| Newsgroups: microsoft.public.dotnet.framework.odbcnet | >| Path: cpmsftngxa06.phx.gbl | >| Xref: cpmsftngxa06.phx.gbl | microsoft.public.dotnet.framework.odbcnet:3070 | >| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164 | >| X-Tomcat-NG: microsoft.public.dotnet.framework.odbcnet | >| | >| Kevin, | >| | >| I would like to allow users to view data from external | >| databases inside of my application. To do this, I need | to | >| be able to get the data types supported by the | database, a | >| list of tables in that database and columns within | those | >| tables (names and data types). I want to work with any | >| database that has an OLE DB or ODBC driver. There is a | >| method for OLE DB - OleDbconnection.GetOleDbSchemaTable | () | >| that provides lots of schema information for a | database. | >| I'm looking for a similar thing in ODBC. I believe | this | >| kind of thing is done in ODBC by calling SQLTables and | >| SQLColumns. I'm hoping there is some way to call these | >| methods in ODBC.NET. | >| | >| Thanks, | >| | >| Sandy | >| >-----Original Message----- | >| >Hi Sandy, | >| | >| >I'm not quite sure what you need to do. Are you going | to | >| get the table and | >| >column information for a database? Can you tell me | what's | >| the database | >| >system? And which method did find in OLE DB class? | Please | >| provide me with | >| >more information, so that I can deliver my assistance | >| more quickly. | >| | >| >If anything is unclear, please feel free to reply to | the | >| post. | >| | >| >Kevin Yu | >| >======= | >| >"This posting is provided "AS IS" with no warranties, | and | >| confers no | >| >rights." | >| | >| >-------------------- | >| >| Content-Class: urn:content-classes:message | >| >| From: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | >| >| Sender: "Sandy Pham" <Sandy.Pham (AT) FrontRange (DOT) com | >| >| Subject: SQLTables and SQLColumns | >| >| Date: Mon, 29 Sep 2003 13:49:47 -0700 | >| >| Lines: 8 | >| >| Message-ID: <292701c386cb$3842a280 $a001280a (AT) phx (DOT) gbl | >| >| MIME-Version: 1.0 | >| >| Content-Type: text/plain; | >| >| charset="iso-8859-1" | >| >| Content-Transfer-Encoding: 7bit | >| >| X-Newsreader: Microsoft CDO for Windows 2000 | >| >| Thread-Index: AcOGyzhANsblFVGOQKe/8syewQHWFQ== | >| >| X-MimeOLE: Produced By Microsoft MimeOLE | V5.50.4910.0300 | >| >| Newsgroups: microsoft.public.dotnet.framework.odbcnet | >| >| Path: cpmsftngxa06.phx.gbl | >| >| Xref: cpmsftngxa06.phx.gbl | >| microsoft.public.dotnet.framework.odbcnet:3065 | >| >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160 | >| >| X-Tomcat-NG: | microsoft.public.dotnet.framework.odbcnet | >| >| | >| >| Hi, | >| >| | >| >| I was wondering if it is possible to call SQLTables | and | >| >| SQLColumns for the ODBC classes in .NET. I see a | >| method | >| >| in the OLE DB classes to get schema information, but | I | >| >| haven't found this in ODBC. | >| >| | >| >| Any ideas? | >| >| | >| | >| >. | >| | >| | | >. | | . |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |