Ask a Question related to ASP.NET General, Design and Development.
-
interrogating database for field names/datatypes?
I'm working primarily in ASP and transitioning to
ASP.NET. This is probably entered to the wrong group but
I'm not sure of what precise database technology I'm
referencing.
I have written a decent little "codewriter" utility that
writes web admin forms, stored procedure code, and the
functions (in ASP) that calls the sprocs that interface
with the database.
The widget works by simple lookups of information that
I've entered to a database table - a very lame approach.
Much better would be to interrogate the live database
directly so as to return a recordset of field names and
datatypes for a given table.
Can someone advise me of the best/easiest way to make
this happen?
Guest
-
Select answer Without field names
how can i get an answer from a select query without the column names first ? i can't understant how to use the option --skip-column-names ... ... -
Table field names not visible
This morning I set up check in and check out to work on a site with someone else. Suddenly when looking at bindings details or any of the other... -
Get database field names from table...
How do you get the database fieldnames from a table and display them using cfquery and cfoutput. Thanks a million... -
List Hash 'Field' Names
I am trying to write more automated code - either I am a lazy typist or am just trying to get more with it! I have a hash I define; I have a form... -
List all and field names database contents
I have been provided with a DSN, user name and password for one of my clients sites. I'm not an ASP developer and need to view all the contents... -
Steve C. Orr, MCSD #2
Re: interrogating database for field names/datatypes?
You could query SQL Server's system tables, but they aren't guaranteed to
stay the same between versions.
You could use ADOX, even though it's COM based. It supports multiple
databases too, so that might be a plus depending on your requirements.
Here's more info on ADOX:
[url]http://www.able-consulting.com/ADOX_Faq.htm#Q4[/url]
[url]http://www.4guysfromrolla.com/webtech/013101-1.shtml[/url]
Microsoft is working on new technologies that aren't COM based but they
won't be released until the next major version of .NET.
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
<kennethfine@hotmail.com> wrote in message
news:155401c35247$ec558890$a001280a@phx.gbl...>
> I'm working primarily in ASP and transitioning to
> ASP.NET. This is probably entered to the wrong group but
> I'm not sure of what precise database technology I'm
> referencing.
>
> I have written a decent little "codewriter" utility that
> writes web admin forms, stored procedure code, and the
> functions (in ASP) that calls the sprocs that interface
> with the database.
>
> The widget works by simple lookups of information that
> I've entered to a database table - a very lame approach.
> Much better would be to interrogate the live database
> directly so as to return a recordset of field names and
> datatypes for a given table.
>
> Can someone advise me of the best/easiest way to make
> this happen?
Steve C. Orr, MCSD Guest
-
Yan-Hong Huang[MSFT] #3
RE: interrogating database for field names/datatypes?
Hello,
Please refer to the following articles:
"HOW TO: Retrieve Schema Information by Using GetOleDbSchemaTable and Visual C# .NET"
[url]http://support.microsoft.com/?id=309681[/url]
"HOW TO: Retrieve Column Schema by Using the DataReader GetSchemaTable Method and Visual C# .NET"
[url]http://support.microsoft.com/?id=310107[/url]
HTH.
Best regards,
Yanhong Huang
Microsoft Online Partner Support
Get Secure! - [url]www.microsoft.com/security[/url]
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
!Content-Class: urn:content-classes:message
!From: <kennethfine@hotmail.com>
!Sender: <kennethfine@hotmail.com>
!Subject: interrogating database for field names/datatypes?
!Date: Thu, 24 Jul 2003 17:58:55 -0700
!Lines: 19
!Message-ID: <155401c35247$ec558890$a001280a@phx.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: AcNSR+xVwyAzfYW9QSKsw1k9r1FeQQ==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:161961
!NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!
!I'm working primarily in ASP and transitioning to
!ASP.NET. This is probably entered to the wrong group but
!I'm not sure of what precise database technology I'm
!referencing.
!
!I have written a decent little "codewriter" utility that
!writes web admin forms, stored procedure code, and the
!functions (in ASP) that calls the sprocs that interface
!with the database.
!
!The widget works by simple lookups of information that
!I've entered to a database table - a very lame approach.
!Much better would be to interrogate the live database
!directly so as to return a recordset of field names and
!datatypes for a given table.
!
!Can someone advise me of the best/easiest way to make
!this happen?
!
Yan-Hong Huang[MSFT] Guest



Reply With Quote

