|
Yes, I want to allow edit the contents of parent columns. Will contents of such column (that refers to the parent column through use of column expresion) be copied into the parent table (if I alter some cells)?
|
|
|
|
|
Dr_Sh0ck wrote:
Will contents of such column (that refers to the parent column through use of column expresion) be copied into the parent table (if I alter some cells)?
Yes. Actually, what's created is just a pointer.
And a pointer can be, in the RAM world, the equivalent of a foreign key in the RDBMS world.
Kant wrote:
Actually she replied back to me "You shouldn't fix the bug. You should kill it"
|
|
|
|
|
I couldn't add a time part of a DateTime in an Access table, using VB.Net
It always adds only the date part.
What is the problem?
Here is the scenario:
My table contains 2 fields - one DateTime field and one TEXT field.
I have a DataAdapter and a Dataset, an I am using the following code:
DsLog1.Tables("Log").Rows.Add(New Object() {"#01/02/03 04:05:06#","SomeText"})
OleDbDataAdapter1.Update(DsLog1)
As a result I got only the date part 01/02/03 into Access table
I know, that that is not due to a field format in the table, because if I add the same value directly in Access table (using access), I can see the new added time value, but not the one, added by the code above.
Any suggestions are welcome.;)
Thanks in advance
Yakimo(to)
|
|
|
|
|
make sure of the table design
the field must be General Date not short date
|
|
|
|
|
It is General Date, because if I add DateTime from the Access itself, I can see the time.
But not the time, added by the VB.NET code.
Maybe I am doing something wrong?
|
|
|
|
|
I have a simple update statement on a table on MSSQL7:
UPDATE MERENI SET MERENI.Hod=-0.5, Kval=' ', Zmena=1 WHERE Ident = 'SLV4485_MI__'
This runs O.K.
When I change it to modify other record:
UPDATE MERENI SET MERENI.Hod=-0.5, Kval=' ', Zmena=1 WHERE Ident = 'SLV4485_MQ__'
It ends with:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '/'.
Pavel
Sonork 100.15206
|
|
|
|
|
Solved. I forgot about a trigger.
Pavel
Sonork 100.15206
|
|
|
|
|
Can anyone please tell me what method I need to use to connect and talk to a MYSQL database through ADO.NET. Not one that has been read about, one that has been tested and used. Please, I need help????????????
Thank,
Kendal
|
|
|
|
|
In addition, can anyone tell me why using the oledb provider for odbc drivers will work with visual basic 6.0 but will not work with .NET???????????????
Thanks,
Kendal
|
|
|
|
|
gvector1 wrote:
In addition, can anyone tell me why using the oledb provider for odbc drivers will work with visual basic 6.0 but will not work with .NET???????????????
You have to install odbc.net drivers as much as I remember.
For using MySQL I think there is no problem with ADO.NET. Use the same connection string that you used before,everythinng else are the same.
Mazy
No sig. available now.
|
|
|
|
|
I have ODBC.NET installed and it does that. I used the same connection that I used in VB6.0 in .NET and it tells me that I cannot use OLEDB provider of ODBC drivers. Why?????????????? Another question, I am trying to use MyOleDb for MYSQL and when I get to the point of creating a select statement, [Information Schema]is automatically inserted into the command. Ex.
SELECT INFORMATION_SCHEMA.patientfile.*
FROM INFORMATION_SCHEMA.patientfile
Even if it is displayed in the Server Explorer, it has [INFORMATION_SCHEMA] attached to it.
What is the deal with INFORMATION_SCHEMA???????????
Thanks,
Kendal
|
|
|
|
|
Hi, everyone:
I am using VS.NET 2003 to create a winForm application ( Same result in VS.NET 2002). The application accesses MS Access DB so that an user can edit the DB.
When I have Datagrid bounded to the tables, all the updates (Insert,Delete and Update) work perfect. However, I have one table that I have to bound it to TextBoxes and CheckBoxes. If I insert or delete a record, it updates the DB fine. When I change the text in the texboxes, or click on the checkboxes, The record is supposed to be modified. When I click on my save button, I use table.GetChanges(DataRowState.Modified) to retrieve the changes. Surprisely, there is no changes, even though I thought I have the right binding.
Apparently, when I change the textboxes or checkboxes, the datarow status did not change to Modified. I can not figure out what I missed here. Please help. Thanks in advance.
Dion
More info:
I have columns as Text, Number and Yes/No in the MS Access DB. Here are the simplified code to do the binding:
For Number:
Binding b1 = new Binding("Text", dsMain1, "LMMaster.LMMasterLMSimConfig.LessonTime");
b1.Parse+=new ConvertEventHandler(TextStringToInteger);
b1.Format+=new ConvertEventHandler(IntegerToTextString);
txtLessonTime.DataBindings.Add(b1);
For Text:
txtConfig.DataBindings.Add(new Binding("Text", dsMain1, "LMMaster.LMMasterLMSimConfig.Config"));
For CheckBox:
chkboxHelp.DataBindings.Add(new Binding("Checked", dsMain1, "LMMaster.LMMasterLMSimConfig.Help"));
|
|
|
|
|
Can we use Array In SQL Server ,if yes can any body tell how to use the same.
Is it possible to call a stored procedure recursively???
Any answer to the above questions will be highly appreciated
|
|
|
|
|
Can we use Array In SQL Server ?
Yes..but using an indirect way : Create a temporary table like this :
<br />
CREATE TABLE #temp(Field1 INT PRIMARY KEY)
(put the above code in a stored proc or trigger etc..)
note the # before the name of the table :#temp this makes the temporary table available for the current connection.. ## will make it available to all connections
to free this table use:
DROP TABLE #temp
Is it possible to call a stored procedure recursively?
yes..but by default there is a limited number of nesting levels (31 I think) but you can change it..
hope this can help
|
|
|
|
|
Thanx for ur valuable suggestions.
Can i have a sample stored procedure which is called recursively.
|
|
|
|
|
Simply call the same stored proc again in the code:
like this:
CREATE PROCEDURE MyProc<br />
AS<br />
.<br />
.<br />
--your code here<br />
.<br />
.<br />
exec MyProc<br />
.<br />
.<br />
GO
the nesting limit is 32 levels (this time i'm sure..got it from MSDN)
you can test for the nesting level using :@@NESTLEVEL
like :
select @@NESTLEVEL AS 'Outer Level'
|
|
|
|
|
What is the best data Access method, that can be used in a large scale (.net/c#)
Enterprise Application.
For Data retrieve :
For Data Insert & update :
Gaurika Wijeratne. // www.gaurika.com
|
|
|
|
|
For Data retrieve :
it depends !! if you want to populate a listbox for example use DataReader (it's fase , readonly , forward only)
For Data Insert & update :
SQlCommands are good enough
|
|
|
|
|
I make a windows service with ATL,and when I want to open a database in the service work thread(I creat a new thread), it doesn't work??? And when start the service in SCM, a error show: debug error ??? I don't know why?
Please help me , and if you have one sample ,give me one?
and my code below:
//if( !m_db.Open( _T("SmsSendBuff"),FALSE,TRUE,_T("ODBC;UID=sa;PWD=") ) )
//these two open operation doesn't work both!!!
//if(!m_db.OpenEx("DSN=SmsSendBuff;UID=sa;PWD=",CDatabase::noOdbcDialog);
_ConnectionPtr Conn1("ADODB.Connection") ;
HRESULT hr=Conn1.CreateInstance( __uuidof( Connection ) );
_bstr_t bsDSN = (L"SmsSendBuff");
_bstr_t bsEmpty = L"";
Conn1->ConnectionString = bsDSN;
//hr = Conn1->Open("dsn=SmsSendBuff;uid=sa;pwd=;","","",0);
AfxMessageBox("open...db");
hr=Conn1->Open(bsDSN,_bstr_t("sa"),_bstr_t(""),0);/*bsEmpty, bsEmpty, bsEmpty, -1 );*/
my email and msn: diyzhaodiyzhao@hotmail.com
|
|
|
|
|
I wanted to know how I can create/design a DB that represents information in heirarichal or tree style.
and the tree levels can be of many levels.
|
|
|
|
|
Here's an example of a table that mimics a directory structure:
create table directories(directory_id int primary key, directory_name varchar(255), parent_directory_id int)
Then add a constraint on parent_directory_id to reference directory_id.
This will then become a "self referencing" table. Any rows that contain a NULL value as a parent_directory_id will be a root node. All other rows are sub nodes of other rows.
|
|
|
|
|
In the .NET documentation Microsoft is recommending usage of SQL server .NET data provider for accessing MSSQL 7 and above.
Will any one please tell me what are the advantages of using .NET library over OLEDB?
Uday
|
|
|
|
|
Uday Patil wrote:
In the .NET documentation Microsoft is recommending usage of SQL server .NET data provider for accessing MSSQL 7 and above.
I believe the main differences are in optimization for speed.
-Nick Parker
|
|
|
|
|
Hi Uday,
I think using SqlClient for accessing SQL Server 2000 in ADO.NET has good speed enhancments w.r.t. make-n-break connections, query update speeds and lot more.
DataSet too seems to have real good methods to update directly to the db. I have'nt fully explored this, since I am currently working with OleDb and IBM Db2 database.
Did this attend to your query?
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Thank you Deepak and Nick,
I gone through many documents related to this. I found some good things abt SqlClient. But I dont think them sufficient enough for change my application to support SqlClient.
For this I am conducting a benchmark test. I will be having results in my hands within a day or two. I will definately update you regarding results.
Thanks and regards
Uday
|
|
|
|