الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

convert datareader to dataset

مغلق
بدأه meme_star في 10 مارس 2006 · 8 رد · 802 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

AA,

i want to update, delet record in datagrid after that update the database content

acually i am using c# in asp.net ,mysql databas and and odbc driver

i tryed to convert the data reader to dataset but it dosenot work

any one can help me by example

#2
meme_star كتب:
AA,

i want to update, delet record in datagrid after that update the database content

acually i am using c# in asp.net ,mysql databas and and odbc driver

i tryed to convert the data reader to dataset but it dosenot work

any one can help me by example

w/s

Post your code that you want to convert into Disconnected data model

Regards

logo.gif
استضافة ويندوز


اقتباس

مساحة تبدأ من 2000 ميجا بايت بسعر 1.99 دولار شهريا.ا

اقتباس

ASP.NET 1.1-2.0-3.0-3.5-4.0-4.5.1 / MVC ASP.NET / PHP 5.x / ColdFusion / MSSQL 2008 & 2012 / MYSQL

#3

sorry i do not understand what u mean

but any way this is my cod and it is work as i said befor i need to converted to datset to be able to delete record in datagrid after that delet it in database

i hope that i will fid the solution here

#4
meme_star كتب:
sorry i do not understand what u mean

but any way this is my cod and it is work as i said befor i need to converted to datset to be able to delete record in datagrid after that delet it in database

i hope that i will fid the solution here

يعني ورينا جزئية الكود التي تريد تغييرها من datareader إلى dataset

logo.gif
استضافة ويندوز


اقتباس

مساحة تبدأ من 2000 ميجا بايت بسعر 1.99 دولار شهريا.ا

اقتباس

ASP.NET 1.1-2.0-3.0-3.5-4.0-4.5.1 / MVC ASP.NET / PHP 5.x / ColdFusion / MSSQL 2008 & 2012 / MYSQL

#5
smiling4ever كتب:
يعني ورينا جزئية الكود التي تريد تغييرها من datareader إلى dataset

odbcconn=new OdbcConnection (ConnStr);

odbcconn.Open();

String sqlselect="select cont_id,cont_name,cont_size,cont_desc,cont_price from content where cat_id='"+DropDownList1.SelectedItem.Value+"'and sub_id='"+DropDownList2.SelectedItem.Value+"'and prov_id='"+int.Parse(Session["prov_id"].ToString())+"'";//"+DropDownList1.DataValueField+"

odbccomm2=new OdbcCommand(sqlselect,odbcconn);

try

{

odbcdata =odbccomm2.ExecuteReader();

DataGrid1.DataSource = odbcdata;

DataGrid1.DataBind();

}

catch(OdbcException ex)

{}

finally

{

odbcconn.Close();

//odbcdata.Close();

//odbccomm1.Dispose();

}

}

this my code

please

help me

#6

I need to see the part of code that you use to Delete/update ....

The above code is will populate the datagrid

logo.gif
استضافة ويندوز


اقتباس

مساحة تبدأ من 2000 ميجا بايت بسعر 1.99 دولار شهريا.ا

اقتباس

ASP.NET 1.1-2.0-3.0-3.5-4.0-4.5.1 / MVC ASP.NET / PHP 5.x / ColdFusion / MSSQL 2008 & 2012 / MYSQL

#7

Sorry

that what i am asking for

#8

You can use something like this:

Dim dt as New DataTable
Dim da as New OdbcDataAdapter
Dim con as New OdbcConnection
Dim com as New OdbcCommand

con.ConnectionString = "........"
com.commandtext = "Select * FROM table1"
com.connection=con

da.selectcommand = com

da.fill(dt)

datagrid1.datasource=dt
datagrid1.databind

Regards

logo.gif
استضافة ويندوز


اقتباس

مساحة تبدأ من 2000 ميجا بايت بسعر 1.99 دولار شهريا.ا

اقتباس

ASP.NET 1.1-2.0-3.0-3.5-4.0-4.5.1 / MVC ASP.NET / PHP 5.x / ColdFusion / MSSQL 2008 & 2012 / MYSQL

#9

thank u for your help

i will try it

هذا الموضوع مغلق.

مواضيع مشابهة