|
Yes, that DataAdapter.ReturnProviderSpecificTypes is what I found, too.
I'll try that and post the result here for reference purposes.
Thank you again!
|
|
|
|
|
Feedback: When using the ReturnProviderSpecificTypes (setting it to true ), I succeeded.
I can do the conversion from the SqlXxx data types (e.g. SqlDecimal ) to native CLR data types be myself, and not let it ADO.NET do it automatically.
Thanks for your help!
|
|
|
|
|
hi! i just wanna ask if it is possible for a datagrid to view some of the contents of a database, then another contents afterwards???
for example, I click the search button to search a particular school subjects. E.g. i search for subject "Theology", then all students who enroll in "theology" should be display, then i will going to search the subject "college algebra", all the students who enrolled in that will be viewed???
What code i will going to use there? will i use the OleDbDataAdapter??? If not, what should i do for it????
|
|
|
|
|
Use dataview and thn set rowfilter to narrow down the result
|
|
|
|
|
ok, i already know how, I saw the process and the codes in the internet...i used the "DISTINCT" in the query builder in Data Configuration Wizard... Then i put this codes in the search button:
OleDbDataAdapter2.SelectCommand.Parameters("subject").Value = ComboBox1.Text<br />
DataSet21.Clear()<br />
OleDbDataAdapter2.Fill(DataSet21)
but how, if i will going to put the codes in the combobox? Because what i want is if i will going to select a subject in the combobox, the students who enroll in that subject will automatically displayed in the datagrid without clicking the search button... Where i will going to put the codes above?
-- modified at 2:31 Sunday 15th July, 2007
|
|
|
|
|
First of all, do yourself a favor and dump the DataGrid and use the DataGridView. You will be much happier with the added flexibility it has. Either way you can reset the contents by changing the DataSource, preferably to a DataView object.
Tom Garth
Developer
R. L. Nelson and Associates, Inc., Virginia
|
|
|
|
|
I created a db in as a dummy in sql 2005 and set the recover as full.But I want to know when there is a problem with the db how to recover.
I have backed up it also.
|
|
|
|
|
|
Hi ALL
In my application i wrote a query like this
"select * from Cand_Information where Category= '" & DpCat.SelectedItem.Text & "' or (First_Name= '" & TxtFname.Text & "' or Last_Name= '" & TxtLname.Text & "' or Sex= '" & DpdownSex.SelectedItem.Text & "' )"
But i want the Category field to be mandatory so i kept it outside the bracket. so that it should only display data with that particular Category. so rest of the fields are optional.
How to write the correct one pl help
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
Change the or to an and
"select * from Cand_Information where Category= '" & DpCat.SelectedItem.Text & "' and (First_Name= '" & TxtFname.Text & "' or Last_Name= '" & TxtLname.Text & "' or Sex= '" & DpdownSex.SelectedItem.Text & "' )"
Ben
|
|
|
|
|
HI
i tried it before also but according to specification if i select only Category then also records should be displayed. if i put and there then i need to select at least one field from the or options. else it not show any record.
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
Try this:
<code>string optionalFiters="";
if(TxtFname.Text!="")
optionalFiters+=" and First_Name= '" & TxtFname.Text + "'";
if(TxtLname.Text!="")
optionalFiters+=" and Last_Name= '" & TxtLname.Text + "'";
if(DpdownSex.SelectedItem.Text!="")
optionalFiters+=" and Sex= '" & DpdownSex.SelectedItem.Text + "'";
</code>
Query:
<code>"select * from Cand_Information where Category= '" & DpCat.SelectedItem.Text & "'" & optionalFiters
</code>
Regards,
Arun Kumar.A
|
|
|
|
|
Please tell me how to insert a string like this: SAMPLE'STRING into an SQL table? How escape special characters in MSSQL?
Thank you.
--------------------------------
visit: http://pmartike.deviantart.com/
|
|
|
|
|
Problem solved
--------------------------------
visit: http://pmartike.deviantart.com/
|
|
|
|
|
I have a Classic ASP website and i want to use MS SQL Express edition as the datasource. I tried the .NET Connectionstring and they do not work for the Classic ASP (ADO) site. I have tried figuring this out for the last three days. PLEASE HELP! Thanks in advance.
|
|
|
|
|
What kind of messages are you getting, if any?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Here is the connection string im using:
Data Source=.\SQLEXPRESS; Integrated Security=True;AttachDbFilename=|DataDirectory|\MyDatabase.mdf;Initial Catalog=MyDatabase
This is the error:
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
|
|
|
|
|
|
Okay I changed my ConnectionString to:
Provider=SQLNCLI;Server=localhost\SQLExpress;Database=data.mdf;
I now get a new Error:
Invalid authorization specification.
I do not have a username or password on the file. Now what??
|
|
|
|
|
It should be:
Provider=SQLNCLI;Server=.\SQLExpress;AttachDbFilename=FullyQualifiedPathToDBFile.mdf;Database=dbname;Trusted_Connection=Yes;"
This will only work for code executed server-side. It won't work for client-side code.
|
|
|
|
|
This CS did the trick. Thanks
|
|
|
|
|
please read the forum guidelines.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
Dang. You beat me to it. Just saw the cross post in the other forum and wondered where I saw it before.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
leckey wrote: Flea Market! It's just like...it's just like...A MINI-MALL!
What happened to cats and awesome.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Hi,
How can i create hash clustered index in oracle?
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
"English is my second language, so please don't mind if i do some grammatical or spelling mistakes in my messages."
|
|
|
|