|
Hi,
Has anyone seen or been able to test out the new release of SQL Server?
I've heard a lot about this new version and read some articles this one regarding the new features, but haven't seen the interface or the integration of C# for writing stored procs.
Any information would be great!
Thanks
Tony
|
|
|
|
|
Anyone on that beta is subject to the NDA requirements that they not disclose any information about the product.
Cheers,
Tom Archer
Inside C#, Extending MFC Applications with the .NET Framework
It's better to listen to others than to speak, because I already know what I'm going to say anyway. - friend of Jörgen Sigvardsson
|
|
|
|
|
What is public knowledge is that .NET can be used to created Extended Stored Procedures, not T-SQL replacement stored procedures.
MS Research is working on an inline .NET language T-SQL replacement, but no MS BU has taken up the project, yet.
Cheers
Mike
Johannesburg, South Africa
|
|
|
|
|
Hi,
My problem is that I have to use data of an oracle-db without a connection!!
The steps I have to do are:
1) filling a dataset
while()
{
2) serializing this dataset
3) storing it into a file
4) deserializing the stored file
5) making changes of the data of the dataset
6) serializing this dataset
if(...==...)
break;
}
Is it possible at all to change data of a dataset without a db-connection?
Thanks
wolf
|
|
|
|
|
You can offcourse change the data in a dataset and serialize the changed data. If you later want to update the database with the changed serialized dataset, you should save the dataset with the diffgram option...
this.WriteXml(@"c:\northwind_subset.xml", XmlWriteMode.DiffGram);
this.ReadXml(@"c:\northwind_subset.xml", XmlReadMode.DiffGram);
|
|
|
|
|
The Batch update method should be faster then using the execute method in udating database. However I did a simple test to insert for example 100 records to a table, noticed that time take for execute method actually is faster then batch update. Is this correct ? any idea ?
Thanks for help
|
|
|
|
|
Hi
My Program use the CADOX Classes from Carlos Antollini
to connect itself to a access database via ADO.
Is there any way to start the Access file import wizard
over ADO to import new tables from csv files to my database?
Please help!
|
|
|
|
|
No, although you might be able to use Access automation to do it; ADO and ADOX don't include such functionality.
Steve S
|
|
|
|
|
design db schema 4 payroll sys
1) employee info with basic salary,allowances,deductions.
2) monthly payslip of employee
3) income-tax calculations at financial year end
i want ER diagram 4 this.
i m student .i have prepared my ER diag.
but i want 2 verify with those of the gurus!!
help urgently!!
(if example template of payroll sys. available pleas direct me 2 the resource.)
|
|
|
|
|
Can anyone point me to a resource, or give an opinion, as to the best practices for using stored procedures vs. views. What are the pros and cons of using either one.
|
|
|
|
|
They have two totally different purposes.
Stored procedures/functions/packages are best used for executing a(n) operation(s) on a set (or subset) of data. A view is a presentation device best used to offer existing data in a different presentation format. Doing alot of programatic work in views typically will invalidate indexes on underlying ables and slow the view down. Views should be kept fairly simple and let the SPs do the grunt transform/operation work they were designed to be good at.
Mark Conger
Sonork:100.28396
|
|
|
|
|
Excellent answer. I have yet to find anything beyond a dscription of what they are, not how or why they are used.
|
|
|
|
|
Is there any way to reboot the sqlserver in C# program?
|
|
|
|
|
Use System.ServiceProcess.ServiceController.
<br />
ServiceController sqlServer = new ServiceController("MSSQLServer", "MYSERVER");<br />
<br />
sqlServer.Stop();<br />
Or if you want to do it through T-SQL issue the SHUTDOWN command through a SqlCommand object.
|
|
|
|
|
I program a app that use one SQLConnection, two sqlDataAdatpers, one DataSet and one DataGrid. That shows Northwind DB's Customers-Orders Master-Detail records.
It runs well with:
this.sqlDataAdapter1.Fill(dataSet11);//Master
this.sqlDataAdapter2.Fill(dataSet11);//Detail
But when I modified sqlDataAdapter1.SelectCommand.CommandText from :
SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers
TO:
SELECT TOP 6 CustomerID, CompanyName, ContactName, ContactTitle, Address, City, Region, PostalCode, Country, Phone, Fax FROM Customers
That I just want top 6 customers data and their orders detail, not all customers.
But it fail in
this.sqlDataAdapter2.Fill(dataSet11);//
Why?
Please help.
And what should I do if I want to add a parameter and get the specified customers and their orders.
Let's roll!
|
|
|
|
|
Hi, I tried to use SQLDMO to get a list of available sqlserver's name in .Net with C#. Here is my code:
SQLDMO.ApplicationClass oSQLServerDMOApp = new SQLDMO.ApplicationClass();<br />
SQLDMO.NameList oNameList;<br />
oNameList=oSQLServerDMOApp.ListAvailableSQLServers();<br />
However, it always failed at the last code of "ListAvailableSQLServers".
Can anyone please tell me why? (I have been worked on this for weeks) Thank you very much.
|
|
|
|
|
<br />
SQLDMO.Application sqlApp = new SQLDMO.ApplicationClass(); <br />
SQLDMO.NameList sqlServers = sqlApp.ListAvailableSQLServers(); <br />
for(int i=0;i<sqlServers.Count;i++) <br />
{ <br />
object srv = sqlServers.Item(i + 1); <br />
if(srv != null) <br />
{ <br />
this.cboServers.Items.Add(srv); <br />
} <br />
} <br />
if(this.cboServers.Items.Count > 0) <br />
this.cboServers.SelectedIndex = 0; <br />
else <br />
this.cboServers.Text = "<No available SQL Servers>"; <br />
found this on the web at CSharpHelp[^]
|
|
|
|
|
Sorry, it doesn't work. Same exception thrown. Thanks anyway.
|
|
|
|
|
Well what exception is thrown? Also, are you getting this error on your development box or a client machine?
|
|
|
|
|
Hello all
I'm using ADO to connect to SQL server database. I would like to know how to pass and retrieve date values from database. if anyone knows how to do it, pls explain with a simple example. I'm using vc++.
Many thanks for your help.
Hari.
|
|
|
|
|
Passing a date value is no different from passing any other data, so I assume you are looking for the format that identifies it as a date. From the SQL Server Books Online, the proper format can take any of these forms:
ODBC Datetime Format
The ODBC API defines escape sequences to represent date and time values, which ODBC calls timestamp data. This ODBC timestamp format is also supported by the OLE DB language definition (DBGUID-SQL) supported by the Microsoft OLE DB Provider for SQL Server. Applications using the ADO, OLE DB, and ODBC-based APIs can use this ODBC timestamp format to represent dates and times.
ODBC timestamp escape sequences are of the format:
{ literal_type 'constant_value' }
literal_type
Specifies the type of the escape sequence. Timestamps have three literal_type specifiers:
d = date only.
t = time only.
ts = timestamp (time + date).
'constant_value'
Is the value of the escape sequence. constant_value must follow these formats for each literal_type.
literal_type constant_value format
d yyyy-mm-dd
t hh:mm:ss[.fff]
ts yyyy-mm-dd hh:mm:ss[.fff]
These are examples of ODBC time and date constants:
{ ts ‘1998-05-02 01:23:56.123’ }
{ d ‘1990-10-02’ }
{ t ‘13:33:41’ }
When accessing a MS Access (.mdb) database, the format is #mm-dd-yyyy#, I believe.
"Nobody is Ugly at 2AM"
|
|
|
|
|
Ladies 'n Gentlemen,
i try to change the DataSets programmatically to a Crystal Report. I set the source with the SetDataSource-method of the CrystalReportViewer.
First at all, i had made a blank report with CR 9 and implements it to my c# project.
My problem now is that the setting of the Dataset takes no effect. Only if I set the datasource in the c# report designer, i can display my chosen information from the table. But therefore I don't need to set any Dataset in my code. If I remove the Datasource in the designer and try to bind the report to a dataset, there is an error such as "no field in formula".
My Dataset is filled (i've tested it). And i don't work with crystal reports for VS .NET 2003 which came up with the VS 2003.
My steps:
1. a blank report (with CR 9) and a windows application project
2. implementing the report in the project
3. filling a dataset with a table from a MS SQL Server (for testing i#ve taken the "pubs" database)
4. load the report soure file to my ReportDocument-instance
5. set unbound fields in my report
6. SetDataSource-method to my loaded report document
7. Set ReportSource to the CrystalReportviewer in my code
That all works fine, but it seems that at runtime the report got no Datasource. Any suggestions? Would be very great.
CsharpThomas alias T. LaBenche
Tom La Benche
|
|
|
|
|
Hi,
I can tell you my steps , let's see if they work for you...
1. Create a Dataset
2. Save it as XML
3. Create the report
4. set the report source to that XML.
5. Use the report and change the datasource to my dataset in memory
that worked for me, I have seen that in some machines that have XP without Service Pack, it doesn't work right, donno why...
HTH
Braulio
|
|
|
|
|
Anyone know cause when i downloaded the free binary and installed it, it was some header files and that's it... can anyone maybe tell me what and how it is used for?
<marquee>Universal Project... Soon to be a .net
|
|
|
|
|
Sounds like you downloaded a MySQL library for some language/platform, rather than the MySQL application itself. Where did you download the "free binary"? The official MySQL download page is at: http://www.mysql.com/downloads/mysql-4.0.html[^]
MySQL is an Open Source database server that aims for speed and ease-of-use.
- Mike
|
|
|
|