Hi, I am storing information being sent to me weekly into a ms sql
database. The one twist I am running into is that later down the line
the information I recieve may require more columns, or columns might
be renamed so having a static database call is out of the question. I
was using mysql but for certain reasons switched to ms sql 2000.
Currently before ms sql, I query the database for show fields which
returns all the database data such as type, column name, etc... then I
use a giant if statement structure to deal with matching and
converting data from my users display to the information into the
database.
So my first question is how do I either query or using datatypes built
into C# return information about a tables setup. I was hoping there
was some sort of table array object which could be returned with names
and types, if not then just an sql statement return.
My second question is I have user data which needs to be displayed
differently then the database raw data, how do I use a C# dataset, and
convert it's column data into my raw database data without having to
create raw insert and update sql strings myself? I would really like
to use the sort of automatic update features of the dataset.
Lastly am I going about this the wrong way? Are there other ways to
map & convert datatypes between a dataset column and a table column. 1 2198 sa*****@hotmail .com (Craig) wrote in message news:<35******* *************** ****@posting.go ogle.com>... Hi, I am storing information being sent to me weekly into a ms sql database. The one twist I am running into is that later down the line the information I recieve may require more columns, or columns might be renamed so having a static database call is out of the question. I was using mysql but for certain reasons switched to ms sql 2000. Currently before ms sql, I query the database for show fields which returns all the database data such as type, column name, etc... then I use a giant if statement structure to deal with matching and converting data from my users display to the information into the database.
So my first question is how do I either query or using datatypes built into C# return information about a tables setup. I was hoping there was some sort of table array object which could be returned with names and types, if not then just an sql statement return.
My second question is I have user data which needs to be displayed differently then the database raw data, how do I use a C# dataset, and convert it's column data into my raw database data without having to create raw insert and update sql strings myself? I would really like to use the sort of automatic update features of the dataset.
Lastly am I going about this the wrong way? Are there other ways to map & convert datatypes between a dataset column and a table column.
Have you looked at the INFORMATION_SCH EMA views?
INFORMATION_SCH EMA.COLUMNS has details about every column, including
data type etc. Or there is sp_help, but it returns multiple result
sets, so it may not be so easy to work with.
Regarding your dataset questions, you might get a better response in a
..Net development group.
Simon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dim St Thomas |
last post by:
I am a developer working on a database client program. I am testing this
program on a Windows XP machine (1.5 GHz AMD chip, 480 Mb RAM, 60 Gb disk)
This machine has Oracle 9.2.0.1.0 and RedBrick database software installed.
I am testing the software by creating small test databases.
If I create an Oracle database using the Database Configuration Assistant,
it takes forever just to create the database. If I choose to create a
new database...
|
by: RobertG |
last post by:
Hello
I have 2 databases on PostgreSQL, for instance base1, base2.
I connect to psql: psql -p 3333 base1
how can I access to base2 ?
for instance I wont do instruction:
insert into test(a, b)
values
select a, b
from basa2.test
|
by: Anand Natrajan |
last post by:
Hi!
I have a VB .NET client that is accessing an rpc/encoded service deployed in Axis 1.2. One of the operations, whoami, returns a string array. The server-side Java signature of this method is
String whoami(MyPrincipal principal)
My .NET client is unable to access the results of that array. The odd thing is that the very same client was able to access the results when the same service was deloyed in Axis 1.1. I've asked the Axis folks...
|
by: Pentti |
last post by:
Can anyone help to understand why re-parsing occurs on a remote database
(using database links), even though we are using a prepared statement on
the local database:
Scenario:
========
We have an schema (s1) on an Oracle 9i database with database links
pointing to a schema (s2) on another Oracle 9i database.
|
by: Thomas LeBlanc |
last post by:
I have 2 databases. I want to move data from table table1 in database db1 to
table2 in db2.
When I query 1 table from another database, I get a cross-database
references are not implemented.
server1% psql db1
emdata=# select * from db2.public.table1;
ERROR: Cross-database references are not implemented
| |
by: JonJon |
last post by:
I'm currently using .NET Framework 2.0 with WSE 3.0. I've read many
articles that DataTables are now serializable and can be passed via web
services. However when I have a datatable as my return type of a web
method my client app (windows form) shows the response type as
"XXXResponseXXXResult" where XXX is the name of my web method.
I've only managed to find one supposed solution...
|
by: situ |
last post by:
Hello all,
i have Database1 and database2,
is it possible to make database connection to database2 by running
stored procedure on database1.
Thanks and Regards
Situ
|
by: JB |
last post by:
Hi All,
I'd like to know how to get a list of available Schemas in a Database
via ODBC.
I had a look at the GetSchema function but I can only get a list of
Tables. Ideally I'd like to get just the list of Schemas to save me
from having to browse the full table list to extract all the available
schemas.
Any suggestion would be greatly appreciated
|
by: Algobardo |
last post by:
Good morning,
this is the first time i write on this forum because i googled and i've seen related post with no solution.
I will expose briefly the problem.
I'm using c# 3.5 and i'm trying using a web service.
Unfortunatly i get a NULL response and i can't understand why.
RpcRsat.RSATWSPortType rpt = new RpcRsat.RSATWSPortTypeClient();
RpcRsat.retrieve_seqResponse res = rpt.retrieve_seq(req);
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |