|
Where does it say that the password is not shown in the connection string after the connection has been closed?
Documentation only talks about the Properties collection, not the ConnectionString .
I'd say the class behaves as specified and documented...
mav
|
|
|
|
|
Im trying to add an expresion which adds a value to the column records
something like this:
datacolumn1.Expresion = datacolumn1 + 10;
and i get an exception ,how can i do this?
|
|
|
|
|
Use like this.
dataColumn1.Expression = "datacolumn1name + 10"
|
|
|
|
|
this is what i ment , and it doesnt work if the columnname is the same as the column you give the expresion to.
this is the exception i get : Cannot set Expression property due to circular reference in the expression.
|
|
|
|
|
I'm trying to connect to DB from Java, I'm doing it exactly like in The Java Tutorial and I'm getting this exception:
"java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
What does it mean, and what's with the "default driver"?? There isn't anything about drivers in that tutorial... :/ And about that strange url strings neither... :/
|
|
|
|
|
|
I have a function in an SDI MFC (no .NET) application that needs to return data in an ADO Recordset. There is no database involved. I simply want to use the ADODB::_RecordsetPtr type as my return type.
How can I create the recordset without a database, connection, session, etc?
Thank you for your support.
|
|
|
|
|
See the ADO wrapper library here.[^]
Use the parameterless constructor to create the recordset. Use AppendField to puplulate the columns, then OpenDisconnected to open it for adding rows, etc. You will likely need to add a function to clone and return the member m_pRecordset (_Recordset*), but the existing Clone function should show the way...
Power corrupts and PowerPoint corrupts absolutely. - Vint Cerf
|
|
|
|
|
Rob Graham wrote:
See the ADO wrapper library here.[^]
Thanks for the suggestion. However, I can't afford to add the overhead of this project just to get a recordset.
All I'm looking for is a way to create a recordset without a connection, session, etc. This must be a simple thing for someone who works with ADO everyday, but it is a puzzle for me!
|
|
|
|
|
First, it's not that much overhead.
second, you could just examine the source and look at the functions i mentioned to see how they are imlemented. The OpenDisconnected does just what you are looking for.
If you dont wan/need the whole libratry, just copy the couple of functions you need into a trimmed-down class...
Power corrupts and PowerPoint corrupts absolutely. - Vint Cerf
|
|
|
|
|
Dear All,
I want to make a simple application that will work like a personal diary. To accomplish that I need to store an image (may be a gif or bmp) in a sql db table. plz guide how to do this?
Thanks
|
|
|
|
|
refer
http://www.dotnetspider.com/Technology/KBPages/558.aspx
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
I want to develope a small db app in vc++6. My only requirement is that my users not have to install anything other than my app (and maybe a later version of mdac).
Is ADO okay for this?
Can someone recommend a good book about it?
|
|
|
|
|
check
http://www.samspublishing.com/title/0672312409
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
Hi, I have a SQL database with usernames and passwords.
1)Now I need find a user name (which user wrote into textbox) and prove the password.
2)I have a registration page, it works well, but I would like to search the database before I add the new record to it, (no duplicity)
3)How can I delete a record? (update record)
Thanks very much for your answer
|
|
|
|
|
None of these questions can be answered without knowing the schema of your database, you should be able to answer them all from the books online, and this smells like homework
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
1. For security you should always store the passwords in an encrypted form. When the user registers for the first type encrypt the password. When the user logs in on subsequent sessions encrypt the password again and search for the encrypted version of the password.
SELECT COUNT(*) FROM myRegistrationTable WHERE UserName=@userName AND EncryptedPassword=@encryptedPassword The above code will return 0 if the user name and password cannot be found, or 1 otherwise. If it returns any other value the database contains duplicate information.
2. You can apply a unique constraint to the table to ensure that no duplicates are entered. Also the primary key is by default a unique value - so sufficient uniqueness may already be covered. If you do this SQL Server will raise an error when you perform your insert and you can pick this up in your .NET application by catching the SqlException that is generated.
You could also write a stored procedure that checks for the existance of a record first then conditionally inserts the new record if there isn't one already.
3. Use the DELETE command.
Does this help?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
I've seen lots of reference to RDA and Merge using IIS and SqlServer.
What if we don't use SqlServer, we use Oracle?
Is there another way to sync our PPCs?
Canada has 6 zones, none of which are erogenous.
|
|
|
|
|
Hi!
I'm new to oracle and i'm trying to connect to a remote oracle db server. I use the following connection string:
string strConn = "Provider=OraOLEDB;DataSource=<dbname>;User ID=<usrid>;Password=<pwd>";
I get the error: The provider OraOLEDB is not registered on the local machine.
What does this means? The provider is installed on the server. Do I have to install it on the local machine too?
Can someone please help me...
|
|
|
|
|
DuckFace wrote:
Do I have to install it on the local machine too?
Yes, if this is a desktop application. No, if you are talking to a web page.
Michael
CP Blog [^]
|
|
|
|
|
Thx for response.
Now i have installed the oracle provider for oledb on my local machine. I have the following method for connecting to the db:
public void createOLEDBConn()
{
string strConn = "Provider=OraOLEDB.Oracle;Data Source=<dbname>;User Id=dummy;Password=dummy";
OleDbConnection myOleDbConn = new OleDbConnection(strConn);
MessageBox.Show("Just before open!");
myOleDbConn.Open();
MessageBox.Show( myOleDbConn.ServerVersion.ToString(), "Test Conn");
myOleDbConn.Close();
}
The first messagebox is being showned, but when I call the open method, the application just waits and I have to stop it myself. I don't know why. Do you?? The dummy user is one I created on the server
|
|
|
|
|
Hi
I use ADO (MDAC 2.8) in a multithreaded application
I call the Connection's Execute method from more than 1 thread.
Is this safe ? or must I use a critical section to protect this operation ?
|
|
|
|
|
ADO's objects are marked ThreadingModel=Apartment in the registry. COM will marshal any calls back to the thread which created the object. This means that concurrent calls will get queued up until the creating thread is ready to handle them.
If this is a problem, create a separate Connection object on each thread.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
thank you for the reply
this behavior will not cause problems..It looks safe and that's what I need..
being queued will not cause a big performance problem at all.
|
|
|
|
|
I have the following query
<br />
SELECT *<br />
FROM (((((SK_SKILLSINAGES AS sia LEFT JOIN SK_SKILLS AS s ON (sia.SkillCode = s.SkillCode) OR (sia.SkillCode = s.ParentSkillCode AND sia.SubSkillCode = s.SkillCode)) INNER JOIN SK_CATEGORY AS c ON sia.CategoryCode = c.CategoryCode) INNER JOIN SK_CATEGORYGROUPS AS cg ON (sia.GroupCode = cg.GroupCode) AND (cg.GroupCode = c.GroupCode)) INNER JOIN AG_AGESINERAS AS ae ON sia.AgeCode = ae.AgeCode) INNER JOIN AG_ERA AS e ON ae.EraCode = e.EraCode) INNER JOIN PR_DEVELOPMENTPOINTS AS pd ON (sia.CategoryCode = pd.CategoryCode) AND (sia.GroupCode = pd.GroupCode)<br />
WHERE ( (sia.SubSkillCode Is Null AND s.ParentSkillCode Is Null) OR (sia.SubSkillCode Is Not Null AND s.ParentSkillCode Is Not Null) AND sia.CategoryCode = c.CategoryCode AND sia.GroupCode = cg.GroupCode AND sia.AgeCode = ae.AgeCode) AND ae.Description = 'Middle Ages' AND e.Description = 'Rolemaster' AND pd.ProfessionCode = 'ANIMIST'<br />
ORDER BY sia.AgeCode, sia.GroupCode, sia.CategoryCode, sia.SkillCode, sia.SubSkillCode;<br />
I have created an index for each of the fields that are being joined and have created an multiple field index for the sort criteria in SK_SKILLSINAGES however this query still takes a long time to load; around ten seconds. If I remove the ORDER BY sort criteria the query is much much faster. Might I be forgetting something crucial that could help speed up this query. It all seems dependant on the sort.
Thanks!
|
|
|
|