|
Thanks!!
When will your website be up and running? What is the URL again?
|
|
|
|
|
Hi,
I need to extract data from MSDE through ADO.net programmatically.
Can someone help me do this pls.
Thanks.
|
|
|
|
|
smadan wrote: I need to extract data from MSDE through ADO.net programmatically.
Well, that is the only way ADO.NET works....
smadan wrote: Can someone help me do this
Can you be more specific about what help you need? You may want to look up MSDN documentation for the classes in the System.Data.SqlClient[^] namespace. Particularly SqlConnection[^]and SqlCommand[^]
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Hi,
Thanks for replying to my message.
I've been able to solve my problem.
My problem was actually to acess MSDE through Outlook, the way it can be done through MSAccess. This requires the use of a Windows service or a tool that will interact with the database and return values like any other database.
Thanks.
|
|
|
|
|
Hi there,
I am very new to working with SQL Server 2005 and would like to configure it on my machine, but I have a problem. The application appears to be installed on my machine (it installed after VS2005) but I can't seem to create any databases or connect to any database servers from the configuration manager...its almost like its a stripped version
I open configuration manager and it lists Services, Network Config and Client configuration...there is no options for importing databases, connecting to databases, creating databases like I am used to with SQL Server 2000. Can you help please?
I can connect to the different SQL Servers using VS2005 though...its this just how SQL 2005 works or what?
-- modified at 2:25 Friday 10th March, 2006
|
|
|
|
|
Hi
I am using SQL server 2005 express edition.
For that there is a separate tool called SQL server management studio 2005.
Using that SQL server management studio 2005 I can do any thing like SQL 2000 server.
Regards,
Chandana.
|
|
|
|
|
Hi Chandana,
When I installed VS 2005, SQL Server 2005 Express installed aswell, but I do not have the server management studio, I just have:
-Configuration manager
-Surface area manager
-Error usage and reporting
Thats it, does this mean I have installed all the components properly?
|
|
|
|
|
hi
yes you need to install SQL server management studio
|
|
|
|
|
Thanks its all sorted now...the express technical community preview addition has some bugs i have found!
|
|
|
|
|
|
You need to install SQL Server Management System. You can download it from Microsoft.com.
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
Now, i have a formula, after solving some expression i want to assign a new value to a Parameter fields.
But i dont know how to do it.
Please help me!
superdragon
|
|
|
|
|
Hi,
I get the following type of error when using SQLSERVER2005 with databases with compatibility level 80(sql2000).
-OLE DB error: OLE DB or ODBC error
According to Microsoft help(http://support.microsoft.com/kb/907284), I should be able to do the following as a work around
-In SQL Server, explicitly add SQLNCL.1 to the list of providers that have in-process access
Any help on how to do this in SQLSERVER2005??
Thanks a lot..
k
|
|
|
|
|
I have never worked with databases before, and my C++ skills are only at the intermediate level. I have been asked to make a program which can store and keep track of students. My first attempt at this involved using Excel to store the data (records are imported from xls files), but this is proving a little more problematic than I care for. I have come to realise that I need a real Database.
I have been advised that SQLite would be ideal in my situation, so I went and downloaded it. Problem is I now have a dll and a lib, with no clue how to use them. I have searched the interent high and low for tutorials or examples showing how to incorporate SQLite into an MSVC project, but I have found nothing.
Could somebody please show me an example of how to use this, preferably in a non-MFC environment.
Also from what I understand there is one main database file which may hold several tables. I'm a little unsure how I should structure this. The end result would hold several thousand students, each divided by year and class. Then for each student I need to be a able to pull a performance record which would hold all the exam results for the students tenure in the school.
Any help with one or both of these matters would be greatly appreciated.
Thankyou
|
|
|
|
|
Eeek, I completely missed this[^] I was looking under the SQL subheading rather than the General. My bad.
My second question still stands though. I would appreciate any advice on how to structure my data.
|
|
|
|
|
How to map the data tables in a remote database to data tables in local memory, if using .net classes?
So, I can get some DataTable instance. thanks.
|
|
|
|
|
Use a SqlDataAdapter (assuming you are using SQL Server) to get the data from the remote database and Fill a DataSet/DataTable.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
If you don't like my previous answer then you might like to elaborate on your problem.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
-- modified at 12:09 Friday 10th March, 2006
|
|
|
|
|
Thank Colin Angus Mackay;P very much, i have gotten desired result according your answer.
|
|
|
|
|
I'm using MySQL on an ASP.net project, using the official .NET data provider to connect to my MySQL database.
What I want to do is get the final SQL command that my MySqlCommand object uses after I've set it's parameters and asked it to execute the query.
MySqlCommand.CommandText returns my original SQL with my parameter place holders, but I want to see the actual SQL used.
For example, I create my SQL queries by the following:
string _SQL = "SELECT name FROM users WHERE department = ?department; "; <br />
<br />
MySqlCommand DbCom = new MySqlCommand(_SQL, DbCon);<br />
DbCom.Parameters.Add("?department", MySqlDbType.VarChar, 25);<br />
DbCom.Parameters["?department"].Value = "engineering";<br />
MySqlDataReader DbRDR = DbCom.ExecuteReader(); <br />
<br />
[SNIP]... CODE HERE ...[/SNIP]<br />
<br />
DbRDR.Close(); <br />
DbRDR = null; <br />
DbCom.Dispose();
If I use "DbCom.CommandText" it will return "SELECT name FROM users WHERE department = ?department; ", but I want it to return the actual query which would be "SELECT name FROM users WHERE department = `engineering`; "
Can anyone please enlighten me on how to do this?
Thanks
|
|
|
|
|
The idea of using parameters in a command is to separate the actual command from the data used to modify the command. That is, it splits the parameters away from the actual command as a way of reducing the possibility of a SQL Injection Attack. It sends the two pieces of information to the database as command + parameters rather than concatenating the parameters into the command before being sent to the database.
Distinctive wrote: it will return "SELECT name FROM users WHERE department = ?department; "
That looks correct to me. That is your command text.
Distinctive wrote: but I want it to return the actual query which would be "SELECT name FROM users WHERE department = `engineering`; "
Look at it this way. If you have a line of C# code like this:
Console.WriteLine("Hello my name is {0}", name); Would you expect the compiler to be able to tell you what the "actual command" is? It can't until runtime, because until runtime name has an unknown value.
[DISCLAIMER: I've not used MySQL and the above is based on how other database data providers work in .NET and any provider produced by a third party may not operate in the same way.]
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
Thanks for your help, that makes sense to me, I didn't realise that it worked that way.
|
|
|
|
|
Hello. I am making a stored procedure with the following SQL statement:
Update Table1 set Field1='X'
Where Field2 = 'N'
I want the StoredProcedure to return Field3 from the updated record. Is it possible to do this?
Thanks.
|
|
|
|
|
sure
right after your update, put the select statement
select field3 from table1 where field2 = 'N'
and execute your stored procedure with either
cmd.ExecuteReader() / cmd.ExecuteScalar()
daniero
|
|
|
|
|
Actually that's not exactly what I wanted. The example I gave was not complete. Here's what I want to do:
- Select @Res = max(Y) From table1 where X=0
- Update table1 set X=1 where Y = @Res
I want to get the max record where X=0 and then update that record. The problem is that there may be two processes executing this stored procedure at the same time.
Thus, they may execute the 'select' part at the same time, get the same 'max(Y)' and then update the same record. That's what I wnat to avoid. I need to assure that between the 'select' and the 'update' there is no process accessing the same record in the table. This is a concurrency problem.
|
|
|
|