|
How can I counter check it when I enter some ID, let's say, ID - P0002 is not in the database. So the datagrid will invisible.
Then, label1.visible = true.
The initial part, I don't understand.
Please help.
|
|
|
|
|
When importing an Access database to SQL Server all the date fields get offset by several days (its uniform but irritating). The formats were changed to long and everything else looks great. Any changes made to the dates after the import continue to reflect the offset. Any suggestions?
Thanks in advance...
Eagles may soar but weasels don't get sucked into jet engines.
|
|
|
|
|
Hi,
I’m a new to asp.net.
I have module01 to create & fill data adapter and another module02 to add a new data row to data set.
(module02…)
Dim dRow As DataRow = xSet.Tables(0).NewRow
dRow("Login_name") = "Baste"
dRow("pws") = "sindhu"
xSet.Tables(0).Rows.Add(dRow)
Since I put this code inside a command button, button_click submits the page to IIS, which I want to avoid.
Is it possible to execute module2 without submitting the page, if answer is “no”, do a client computer need to maintain consistent connection with IIS while adding a new row in a data set ?so what is disconnected model ? please explain
Advance Thanks
|
|
|
|
|
When you write ASP or ASP.NET, you are writing server-side code, i.e. the code that you write will execute on the server. If you want to run client-side code, then you have to write that in JavaScript.
In terms of ADO.NET, the disconnected nature of datasets refers to the idea that the data is available after the connection to the database has been closed. It has nothing to do with IIS.
my blog
|
|
|
|
|
I am designing a new application and I don't want to confine it to a specific database system. So when I want to choose a Data adapter in C#.NET, my options are OdbcDataAdapter OR OleDbDataAdapter. Can anybody explain me the different between the two or give me a link where I can learn abut the difference?
|
|
|
|
|
|
No, I am sorry. The information with the MSDN page is not sufficient. I have already gone through that.
It just tells me the following difference:
- The OleDbDataAdapter object is suitable for use with any data source exposed by an OLE DB provider.
- The OdbcDataAdapter object is optimized for accessing ODBC data sources.
But does not explain in scenarios where both OLE and ODBC providers are available (e.g. MS SQL Server and Oracle) what should I go for. What are the merits/demerits of each etc.
|
|
|
|
|
Supposedly OleDb is faster thsn Odbc because it has to go through fewer layers between your application and database.
In my experience however, this hasn't been the case - they appear to be equal, with the Odbc giving better support for Oracle (although Oracle now provide ODP.NET which should adjust things).
If you google for OLEDB v's ODBC, you'll see several discussions of this sort.
http://www.google.co.uk/search?q=OleDB+vs+ODBC&hl=en&lr=&ie=UTF-8&start=0&sa=N
store your internet favourites online - www.my-faves.co.uk
|
|
|
|
|
I'm pretty sure the original OLE DB used to call the ODBC drivers.
Now i think both are developed in parallel - neither depends on the other.
I had always heard/thought the opposite, ODBC is a simpler C API design that has fewer layers. I tend to believe this as i've seen internal COM calling diagrams - i can't believe it is a thinner API.
I still consider ODBC to be a cleaner/faster interface, but OLE DB is more abstract - it allows connections to excel spreadsheets, text files, ...
I tend to still use ODBC for most projects. The only place i'm actually using OLE DB right now is for WinCE development - and that's because it doesn't support ODBC.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hey thanks Davey... This will help!
|
|
|
|
|
Thanks guys. I got some amount of info but it mainly described the concept behind OLEDB and ODBC technologies, like:
ODBC is Open Data Base Connectivity, which is a connection method to data sources and other things. It requires that you set up a data source, or what's called a DSN using an SQL driver or other driver if connecting to other database types. Most database systems support ODBC.
OLE is Object Linking and Embedding. OLEDB is partly distinguished from OLE itself, now called
"automation".
OLEDB is the successor to ODBC, a set of software components that allow a "front end" such as GUI
based on VB, C++, Access or whatever to connect with a back end such as SQL Server, Oracle, DB2,
mySQL etal. In many cases the OLEDB components offer much better performance than the older ODBC.
OLEDB is a different type of data provider that came about with MS's Universal Data Access in 1996 and does not require that you set up a DSN. It is commonly used when building VB apps and is closely tied to ADO. It works with COM, and DCOM as of SQL 7.0.
However my quetion is more related with the .NET classes provieded for the same. If I don't want to get tied to a specific database, what is the better choice: OdbcDataAdapter OR OleDbDataAdapter in terms of performance and scalability?
|
|
|
|
|
Hi,
Iam using OleDbCommand to insert/update data in the database (SQL 2000).
IS it possible to handle "RowUpdated event" without using OleDbDataAdapter ??
Are there any other methods for handling the updated row event ?
I Need this to get the value of an Auto increment field.
Any help will be greatly appreciated.
Thanx
saleem
|
|
|
|
|
Hello.
I try to Open CDaoDatabase object in Windows XP (the user has the Excel
2000), and I use the "Excel 8.0" connect string. It returns the following
error "Couldn't Find Installable ISAM". BUT the same code works in Windows
2000. I tried the "Excel 9.0" and "Excel 10.0", but without success...
CDaoDatabase* p_daoDB = NULL;
p_daoDB = new CDaoDatabase;
p_daoDB->Open(_T("SCCardOS.XLS"), // file name
FALSE, // exclusive
FALSE, // read only
_T("Excel 8.0;")); // connect string
I found the post with the same problem, but without solution ;(
I need some tips for solving...
Thank you in advance.
|
|
|
|
|
In the used Dataset (e. g. 'Dataset1') we have some colums with GUIDs /DSNs.
Within the Report-Layout we want to render the related Values to these GUIDs (e.g. the name to an Adress-GUID), which are kept in another table (e.g. 'adresses').
For example, we used the FoxPro-Report Engine in earlier times and there was a Command named 'SEEK', which pointed the cursor to en other destination! Is there something comparable in Reporting Service or how does it work the best way?
Thanks in advance for help !
|
|
|
|
|
Hi. (Firstly, sorry for my English)
I have a set of .dbf files (tables) in directory
I want to work with this files as database with ADO.NET
(c#)
I have no problem when reading data, but I can't change it.
For example, i have a file "test.dbf" in folder "d:\db".
The test.dbf is a table with 2 columns
- CODE (number[4])
- NAME (character[20])
The table has a one record (0,"joan")
I need to add a new record to this table (1,"alex")
Code:
<br />
string TableName = "test";<br />
string SelectString = "SELECT * FROM " + TableName;<br />
string DirectoryName = @"d:\db";<br />
string ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +<br />
DirectoryName + ";Extended Properties=dBase 5.0;";<br />
<br />
OleDbConnection myConn = new OleDbConnection(ConnectString);<br />
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter();<br />
myDataAdapter.SelectCommand = new OleDbCommand(SelectString, myConn);<br />
<br />
myConn.Open();<br />
<br />
DataSet ds = new DataSet();<br />
myDataAdapter.Fill(ds, TableName);<br />
<br />
DataTable t = ds.Tables[TableName];<br />
<br />
DataRow dr = t.NewRow();<br />
dr["CODE"] = "1";<br />
dr["NAME"] = "alex";<br />
t.Rows.Add(dr);<br />
<br />
myDataAdapter.Update(ds, TableName);
myConn.Close();<br />
When I run "Update" method of OleDbAdapter
error occurs.
"Update requires a valid InsertCommand when passed DataRow collection with new rows."
I asked about this problem in russian forums many times,
but nobody can answer me exactly.
I understatnd that I have to specify the InsertCommand of OleDbDataAdapter but how I have to do it I don't.
Could you answer me, what "InsertCommand" must be or (it would be better) give an examle.
Thank you.
|
|
|
|
|
hi,
Here you are trying to update your data table with out any update command.
Suppose if you want to call like this
DataRow dr = t.NewRow();
dr["CODE"] = "1";
dr["NAME"] = "alex";
t.Rows.Add(dr);
myDataAdapter.Update(ds, TableName); // ERROR OCCURS HERE
myConn.Close();
You need to mention the update command. Other wise
it won't update the data.
So first define an update command for your data adapter.
This is also true for Delete, insert etc.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Are there any good resources out there for learning how to write ActiveX Controls? I am looking primarily for ones dealing with VC++ or C# (although from what I've read, traditional ActiveX isn't possible in managed code, only with .NET Framework installed on the client machine). I have searched a good amount on the web, but have been unsuccessful thus far in finding anything too useful to the Beginner.
Thanks.
|
|
|
|
|
This is not really the best forum for this question, but I'll answer as best I can...
By far the easiest language to develop ActiveX controls in is VB6.
You are correct that it is not possible to develop ActiveX controls in managed code (at least without some unsupported hacks). There are .NET equivalents though, both on the ASP.NET side and the WinForms side.
my blog
|
|
|
|
|
between:
SELECT * FROM
Blah1 as T1
INNER JOIN
Blah2 as T2
ON T1.ID=T2.ID
INNER JOIN
Blah3 as T3
ON T1.Id=T3.ID ;
vs.
SELECT *
FROM Blah1 as T1 ,Blah2 as T2,Blah3 as T3
WHERE T1.ID=T2.ID AND T1.ID=T3.ID ;
I've never really understood the advantage of the first syntax, and I'm always using the second syntax.
Marc
MyXaml
Advanced Unit Testing
|
|
|
|
|
The advantage of the first syntax is legibility. It visually and logically separates the evaluations that are specifically used to define the join(s) from the evaluations that are only used to filter the joined results.
Grim (aka Toby) MCDBA, MCSD, MCP+SB
SELECT * FROM user WHERE clue IS NOT NULL
GO
(0 row(s) affected)
|
|
|
|
|
If you have access to SQL Query Analyzer, type each statement and then Ctrl + L (Display Extimated Execution Plan).
This will display what steps the server will do and when you move the mouse pointer over each step it will tell you the estimated cost in CPU cycles, using the database current stats.
|
|
|
|
|
The first syntax is far superior in my mind, for the following reasons:
1) legibility
2) ease of maintenance - easily add/remove a join/condition
3) flexibility - it is easier to construct complex queries this way, especially those containing outer joins and/or complex joins.
I do think it is possible that the 1st syntax will lead to better optimized queries, because it gives the optimizer explicit information on what is a join and what is part of the WHERE clause. In a simple query it probably makes no difference, but once the query becomes complex, I'm sure it helps the query optimizer to know these things.
Final point on legibility - I usually write my queries something like this
SELECT *
FROM Blah1 as T1
INNER JOIN Blah2 as T2 ON T1.ID=T2.ID
INNER JOIN Blah3 as T3 ON T1.Id=T3.ID
which is much more legible.
my blog
|
|
|
|
|
Hi all. For what it's worth, the WHERE clause syntax for creating joins was part of the ASNI SQL/86 standard. The INNER JOIN / OUTER JOIN syntax became part of the ASNI SQL/92 standard.
In addition to the other comments made, the JOIN syntax also allows for more functionality, such as the FULL OUTER JOIN supported in some RDBMSs.
|
|
|
|
|
Greetings,
I have a combo box which I have bound to a datasource, and I want to remove the datasource so it doesn't have anything. I have to use it display some seperate text information.
(ie) How I set the datasource.
comboboxA.DataSource=DataSetTest;
comboboxA.DisplayMember="TableField1";
You can clear a datasource if you bind to a binding manager like this, and show 1 field at a time.
(ie) binding the object
comboboxA.DataBindings.Add("Text", DataSetTest, "TableField1");
(ie) To remove the binding you call.
comboboxA.DataBindings.Clear();
Is there an equivalent for removing a binding on a control while using a datasource?
Thanks in advance for any help!
|
|
|
|
|
hi,
Try this,
Combo.DataSource=null;
**************************
S r e e j i t h N a i r
**************************
|
|
|
|