|
Gud luke to u
<< >>
|
|
|
|
|
Yes ok ! i think i'll find better by my self lol
SeLoRBIS
|
|
|
|
|
I've configured several COM components to support transactions, and they are called by my C# serviced component, which is configured to require a new transaction.
However my component fails on the first COM call, with an error saying that the new transaction could not enlist in the specified transaction coordinator. Is this a cross machine problem, and if so, would having all components and databases running on one machine under one coordinator solve it?
I'm new to this, any help would be appreciated.
The DJ's took pills to stay awakwe and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
Having the components all on one server isn't the issue. COM+ allows for cross machine transactions, look elsewhere for the solution.
|
|
|
|
|
|
hi there,
manije wrote:
get id from a table
=> using ExecueScalar to get id from DB. then convert and assign it to a variable
manije wrote:
I want to display(id) in a messagebox
=> convert ur variable to string and display this in a msgbox
<< >>
|
|
|
|
|
|
thanks for your reply !
I'm a beginner in C# .
Can you write the code please !
Remember
my variable is GetId[int] and my table has 3 fields ,id[int],name[nvarchar],fname[nvarchar] and I want to put the id (from the table ) into the variable (GetID). THANKS!
mostafa hosseiny b.
-- modified at 7:43 Wednesday 7th September, 2005
|
|
|
|
|
manije wrote:
I'm a beginner in C# .
Can you write the code please !
It doesn't matter that you are a beginner, you have to think through the problem for yourself otherwise you will learn nothing. I have already seen that you ignored my advice - there could be a valid reason for this, but I don't know what that it. From my point of view I am just being ignored and for the money* I'm getting for providing this service it really isn't worth it.
Hint: I don't get paid for this. I volunteer my own time and my own equipment to try and help - but you have to show that you are willing to learn and not just copy and paste code snippets
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Derar Colin Angus Mackay !
Certainy I accept your Advice , and in this way , it's need to me to try do best ... . Learn,Understand of the concept ... ,
in any case I have to study and ask to every one can help me !
by the way , finally and after a day , I write this to reply my app.
int mygetid=Convert.ToInt32(mytable.Rows[0][0]);<br />
MessageBox.Show(this.mygetid.ToString());
---------------------
in any case , thanks in advance again for your patient
mostafa hosseiny b.
-- modified at 3:19 Thursday 8th September, 2005
|
|
|
|
|
we're very happy to help u
but sometimes I cannot remember exactly funcs/statements to give u an perfect example code
Happy programming
<< >>
|
|
|
|
|
also , we're very very happy , if every one advice me , because we learn atleast.
Also and also we're looking for your Help !
Thanks ! and Happy day!
mostafa hosseiny b.
|
|
|
|
|
I am trying to bind the data to Datagrid in ASP.NET web application. My database “AddressBook” is created in MS Access 2000.
I used ‘OleDBConnection’ control and set ‘ConnectionString’ property referring to my MS Access database.
I have written following code in the ‘Page_Load’ method,
private void Page_Load(object sender, System.EventArgs e)
{
OleDbCommand oleCommand = new OleDbCommand();
oleCommand.CommandText="Select * from ADDRESSDATA";
oleDbConnection1.Open();
oleCommand.Connection=oleDbConnection1;
OleDbDataReader oleDataReader = oleCommand.ExecuteReader();
DataGrid1.DataSource=oleDataReader;
DataGrid1.DataBind();
oleDbConnection1.Close();
}
Code compiles successfully, but it following error during execution:
“The Microsoft Jet database engine cannot open the file 'C:\Manisha\Address MS Access Data\AddressBook.mdb'. It is already opened exclusively by another user, or you need permission to view its data.”
Ms Access Database I am using is not open and no other application uses that database.
What’s wrong in this application. Can anyone suggest something please?
Thanks
|
|
|
|
|
one thing, u have to grant permission of asp.net account to AddressBook.mdb
<< >>
|
|
|
|
|
thanks for reply...but how should i do this? is there any specific property to set? pls let me know
|
|
|
|
|
now I cannot remember excactly what steps need to do.
but u can try as:
- right-click on the folder that contains the .mdb file
- In Security tab, add asp.net account and remeber to add Write permission for asp.net account
Hope this helps
<< >>
|
|
|
|
|
hello, thanks for reply, but it is not clear to me how to progress, what do you mean by ASP.NET account? whaere i hv to specify it? I would be glad if ui let me know more deails?
|
|
|
|
|
hi there,
default, ASP.NET account is created when installing asp.net. u can see this by browsing to computer managerment >> Local Users and Groups
this account has limited rights, so u have to grant permission for this account to access ur DB file
<< >>
|
|
|
|
|
I am trying to change a schema of dataset. What I need to do is to change a column type from int to string. I did that in the .xsd file, saved the changes and ran the customer tool (xsd.exe). But strangely the generate cs file does not reflect the change. The column type is still integer. As expected the sqldataadapter fill function does not work.
Any ideas why this happened?
|
|
|
|
|
Compared to a virtual folder, how slow is retrieving and displaying an image from a database compared to retrieving and displaying an image, both on a webpage.
I've currently switched to a mechanism to store images for a webpage in a database rather than a file system because of the hassle of maintaining folders of images that change often, it just removed a lot of work by being able to place the images in the database.
|
|
|
|
|
dear Mackay !
if it possible for you to write your e_mail , for send my application about user and password and ... for you .
my e_mail :nasim476@yahoo.com
thanks for everything !
mostafa hosseiny b.
-- modified at 12:49 Tuesday 6th September, 2005
|
|
|
|
|
First of all, why is it that so many people can't understand what the 'email' link is for ? Secondly, if you have a problem, why don't you ask more questions here ? You're lucky enough that people spend their time giving you free help online without asking to invade their inbox.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Could someone clear up a possible memory leak for me? In using ADO.NET in MFC Projects it is written:
#pragma push_macro("new")
#undef new
try
{
m_OleDbConnection = new OleDbConnection(
S"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\test.mdb"
);
m_OleDbConnection->Open(); // Open up the connection
m_OleDb = new OleDbCommand(S"select * from Persons", m_OleDbConnection);
m_Reader = m_OleDb->ExecuteReader();
int count = 0;
while (m_Reader->Read())
{
AddToList(count,m_Reader->get_Item("First Name")->ToString(),
m_Reader->get_Item("Last Name")->ToString(),
m_Reader->get_Item("Phone Number")->ToString()
);
count++;
}
}
catch(Exception *e)
{
AfxMessageBox(CString(e->ToString()));
}
__finally
{
m_Reader->Close();
m_OleDbConnection->Close();
}
#pragma pop_macro("new")
What is bothering me is there is a new with no delete. The most surprising one is m_OleDb which doesn’t even have a close, let alone a delete. I tried adding a close as well as a delete and neither was accepted by the compiler.
I open and close the database hundreds of times, so I wanted to consider leaving it open and then I started to think about the memory leak problem.
Can anyone give me a hint why a memory leak doesn’t seem to play here?
Thanks,
Ilan
|
|
|
|
|
You need to look up on Garbage Collection in .NET. Basically, there is an entity called the Garbage Collector (GC) that runs in a background thread. It does the cleanup for you, when it determines that a cleanup needs to be done. In your case, when the GC decides to run, if it sees that there are no live references to OleDbConnection and OleDbCommand objects, it will reclaim the memory.
In other words, you can't explicitly delete, as in C++, the GC will (attempt) do it when it decides to. The Close method is to release resources held up by the object, OleDbConnection has Close because it wraps a database connection, but OleDbCommand is just an abstraction for a SQL command, so that's why it doesn't have Close. Calling Close has nothing to do with GC, though.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
ERm.... given that his code contains ->, I'd say it's C++ and not C#
Oh, it's MC++, because he's using .NET objects.
Christian Graus - Microsoft MVP - C++
-- modified at 17:49 Tuesday 6th September, 2005
|
|
|
|