473,520 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how i can select two cols from dataset and add them in database

1 New Member
Hi
i m new please need some help
i have situation i m getting dataset from web services. and i need to
select two cols from it and add them in database
can anybody tell me who to do it i don't want a full table from dataset. just two cols say A and B.
i have a table database which has two cols and i want all output must be inserted in in database

help me out in scrip please
regards
saeen
Jul 17 '07 #1
1 972
kenobewan
4,871 Recognized Expert Specialist
Welcome to TSDN. One way is to set AutoGenerateColumns to False and explicitly specify what columns to diplay. i.e.,

<asp:DataGrid runat="server" ... AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="DataSetFieldName1" ... />
<asp:BoundColumn DataField="DataSetFieldName2" ... />
<asp:BoundColumn DataField="DataSetFieldName3" ... />
</Columns>
</asp:DataGrid>
Jul 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2878
by: Phil Powell | last post by:
$sql = 'INSERT INTO fs_usermetadata (' . substr(trim($cols), 0, strrpos(trim($cols), ',')) . ') VALUES (' . substr(trim($values), 0, strrpos(trim($values), ',')) . ')'; if (!mysql_query($sql)) { $hasSubmittedUser = 0; $errorMsg .= $font . '<font color=cc0000><li>Could not insert record into db</li></font>' . '</font><p>';
4
1441
by: Dave | last post by:
Hi, I was wondering if anyone can help me with this query. I have two tables. table_1 is a master table that contains all records. table_2 contains IDs of some records from table_1 and flags from those records. I'd like to query all records and set the flags for them with following test: if a record exists in table_2, set its flag from FLAG...
3
4820
by: dror | last post by:
Hello, I have a problem that actually doesn't even make sense. I have 4 million rows in my database. I want to get all records into a DataReader and then read. So if I do it in DAO (either in VB or MFC C++) it takes around 1 second to get the recordset and then around 10-15 seconds to iterate through the recordset. This speed remains the...
1
939
by: patryk78 | last post by:
hello i have a database in MS SQL from my friend and i cant modify structure of this database, and there is a little problem : i have one table ARTICLES where are columns : id_article, name and others second table is CONTRACTOR with id_contractor, name, and contractor may have many prices of one article, these prices are in many tables...
1
4019
by: Diffident | last post by:
Hello All, I am trying to filter rows in a datatable based on filtercriteria and sortcriteria using the datatable.select() method. I am encountering a strange behavior in this process. Here is what I am trying to do... ---------
7
2986
by: Matt Jensen | last post by:
Howdy Fairly simple question I think, I presume the answer is no it can't be reused for 2 *SELECT* statements, but just hoping for clarification. Just asking in the interests of trying to minimise code. i.e. if the SqlDataAdapter uses a connection to the one database for a select statement and I want to do a second select statement on...
4
1326
by: bill salkin | last post by:
The code below creates a dataset containing a table called "Customers" from the Northwind database Later on in my code, after the database connection is closed, I need to access this dataset to get all records with "ContactTitle" = 'Owner' and "City" = 'London'. I have tried using the SELECT and Find methods of dataset techbnology but I...
1
5006
by: Jan Doggen | last post by:
Hello all, I have a SELECT like this (the 'alert()s are temporary): <FORM method="POST" action="/scripts/runisa.dll?OVB2.132964:PGSPLITVACAFMELDEN:1095144287.9159" id="hulpform" name="hulpform"> <select name="varVervuld" id="varVervuld" onChange="alert('Onchange');Vervuld(this.options);"> <option value="0"...
6
3183
by: fniles | last post by:
I am using VB.NET 2005 and Access database. My program uses a timer that kicks in every 1 min to read from a database and copy the dataset table to a datatable. This database is in a class called clsStat.vb. Then I pass this class to a thread. Each thread will call a function inside the clsStat.vb to do a "Select" of the datatable. Every...
0
7204
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...
0
7602
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7560
tracyyun
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...
1
5127
isladogs
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...
0
4788
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...
0
3282
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
837
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
506
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.