|
yes it should be right.
what's the error?
|
|
|
|
|
Error 1 The best overloaded method match for 'System.Data.OleDb.OleDbDataAdapter.OleDbDataAdapter(string, string)' has some invalid arguments
Error 2 Argument '2': cannot convert from 'System.Data.SqlClient.SqlConnection' to 'string'
$h@ma!|@
|
|
|
|
|
if u provide ur data binding function.it wil be easy to rectify it.
|
|
|
|
|
OleDbDataAdapter da = new OleDbDataAdapter(strQuery, conn);
conn.Close();
DataSet ds = new DataSet();
da.Fill(ds, "table name");
searchgrid.DataSource = ds.DefaultViewManager;
$h@ma!|@
|
|
|
|
|
try this one
OleDbDataAdapter da = new OleDbDataAdapter(strQuery, conn);
conn.Close();
DataSet ds = new DataSet();
da.Fill(ds, "table name");
searchgrid.DataSource = ds;
searchgrid.databind();
|
|
|
|
|
Sonia Gupta wrote: conn.Close();
DataSet ds = new DataSet();
da.Fill(ds, "table name");
Is it possible to fill DS when connection is closed ?
|
|
|
|
|
u shd decleare the namespace System.Data.OleDb.OleDbConnection
|
|
|
|
|
$h@ma!|@ wrote: OleDbDataAdapter da = new OleDbDataAdapter(strQuery, conn);
What is the type of conn ? OledbDataAdapter is having 4 overloaded methods.
1. public OleDbDataAdapter ( System.String selectCommandText , System.Data.OleDb.OleDbConnection selectConnection )
In this you need to pass the select query and OledbConnection object as parameters
2. public OleDbDataAdapter ( System.String selectCommandText , System.String selectConnectionString )
In this pass Query and connection string
3. public OleDbDataAdapter ( System.Data.OleDb.OleDbCommand selectCommand )
This accepts OledbCommand object
and last one is with no parameters. Check your call matches with these methods ?
|
|
|
|
|
ok fine i'll try thx
$h@ma!|@
|
|
|
|
|
Hi i posted this msg already...,
Our members also said some answers...,
But still i didn t get proper answer...,
So,I am post one more time...,
Plz give me some solution for this probs...,
I am trying to display my grid cell value in grid textbox...,
So i used this following code...,
For Each fillgrdregtextbox As DataGridItem In dgrdmain1.Items
Dim AppRgHrs As TextBox = CType(fillgrdregtextbox.FindControl("txtAppRgHrs"), TextBox)
Dim AppOtHrs As TextBox = CType(fillgrdregtextbox.FindControl("txtAppOtHrs"), TextBox)
If fillgrdregtextbox.Cells(25).Text <> "" Then
AppRgHrs.Text = Val(fillgrdregtextbox.Cells(25).Text)
AppOtHrs.Text = Val(fillgrdregtextbox.Cells(26).Text)
ElseIf fillgrdregtextbox.Cells(27).Text <> "" Then
AppRgHrs.Text = Val(fillgrdregtextbox.Cells(27).Text)
AppOtHrs.Text = Val(fillgrdregtextbox.Cells(28).Text)Else
AppRgHrs.Text = 0
AppOtHrs.Text = 0
End If
Next
In this that first if condition is working...,
But that elseif is not working...,(Mentioned in bold)
Instead of that i am getting 0 on there...,
how to solve it...,
Plz tell me...,
Advance thanks...,
Regards,
Magi
|
|
|
|
|
Is the 27th column is BoundColumn or template column? The Text property would be always empty in the TemplateColumn.
|
|
|
|
|
27th is the bound column...,
Regards,
Magi
|
|
|
|
|
I am in the middle of an application where i am using ASp.net with Ajax controls..
I want to pop a value from the gridview, when i click it and to be displayed in the cascading drop down list..
there are two dropdown lists, first one works fine always... the second one gets enabled only when i select values in first..
the gridview value i click pops in to the first dropdown but not to second one...
The code i used is
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByText(ds_rec.Tables[0].Rows[0]["Column1"].ToString()));
i need help
thanks in advance....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
|
|
|
|
|
What's the use of Master page in asp.net 2.0
Is it related to like MDI parent form in window application.
|
|
|
|
|
master page is like paretnt page
the layout in master page will automaticaaly appear to all child pages..the only different thing will be content place holder
$h@ma!|@
|
|
|
|
|
if we want same header footer and and any thingh in ui in deferent page then it help
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
if u please provide a suitable link..?
Thanks..
Sonia Gupta
soniagupta1@yahoo.co.in
|
|
|
|
|
its contain many content place holder where we put our usercontrol(ascx page)
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Its not so hard yaar first u go to-> add new Item and select master page-> mouse right click 0n master page in solution and click(add content page) then default page open ->past ur user control in ContentPlaceHolder and then injoy with master page
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
ok.. Thanks...
|
|
|
|
|
it my pleaser. where u , Work In delhi or some where else
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
chandigah
IM me at yahoo messenger
id = soniagupta1
|
|
|
|
|
messenger not allowed in my office
i am also working om IM
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|
|
Piyush i need to talk to u urgently at yahoo messenger....Please..
|
|
|
|
|
not possible at this time u give me miss call i will call back
Piyush Vardhan Singh
Programmer
TAS NewDelhi
India
9313077379
|
|
|
|