|
Actually I'am pretty sure...that it is not possible to do it..
Use Microsoft Access and JET 4.0 database provider instead...
It works...and is much faster...as it make queries directly on the data in the database(your Access file)....
Best regards
/PabloPablo
|
|
|
|
|
Hello, I read your last message (with that solution) but I think it has an inconvenience (except I haven't caught idea): if you choose to do it through a provider (in this case: JET), it asks for path of the file as such, so what about if your file changes location?, or perhaps, if provider changes (suppouse you move to SQL Server 2k or maybe another one); it means if you have 200 reports, you'll have to change 200 times just because of that linking through report itself.
In other words, I suppouse that SOMEHOW Microsoft has thought about that issue. (And at same time, to have reports built-in with your app).
|
|
|
|
|
Hello, hope this could be the answer:
I have 2 forms, on second there's a viewer with its modifier set to public (of course, this is not advisable) but in order to see this, is much better to see with few lines than to create a better mechanism but having to go to many places. With no more words, here it goes:
private void button1_Click(object sender, System.EventArgs e)
{
oleDbDataAdapter1.Fill (dataSet11);
Form2 f2 = new Form2 ();
CrystalReport1 cr = new CrystalReport1();
cr.SetDataSource (dataSet11);
f2.crystalReportViewer1.ReportSource = cr;
f2.ShowDialog ();
f2 = null; // I don't know if it necessary, because GC.
}
|
|
|
|
|
On SQL 7 I wrote a stored procedure which included:
Insert tblA
A.item1, A.item2,A.item3,
...
A.item10,A.item11,A.item12,
B.item1,B.item2,B.item3
From tblA A, tblB B
Where A.IDcol = @colA
And B.IDcol = @colB
Everything worked as expected.
I generated a script, imported it into another server (which happened to be SQL 2000), and it would not write the last three items when inserting. The fact that the items were coming from another table appears to just be a coincidence. I replaced the final three items with constants and there was still no joy. Finally I wrote an Update to modify the final three items after the insert was completed. The insert itself generated no errors, it just wouldn't write the data.
If anyone has seen this kind of problem before, I would sure appreciate knowing the cause and how to avoid it in the future.
Thanx...
>>>-----> MikeO
|
|
|
|
|
I'm writing a data acquisition program that will be acquiring data and storing it within multiple tables of a DataSet. I'd like to export this data set directly to a new excel file if possible. I'd like each table of the data set to be a new worksheet within excel. My customer doesn't know databases so they are requiring that I use excel. Any help or advice would be great.
Jeff
|
|
|
|
|
How simple (or how complex) should the resulting workbook be? Also, perhaps obviously, there are a number of ways someone can transform SQL data into Excel -- using the DTS Wizard, exporting to Excel using a remote view in Access, or transforming a DataSet into Excel using the Excel object model. Which method is simpler for your users? In the case that you want to generate Excel directly from C# or VB.NET, you walk through the rows and columns in your dataset and create corresponding rows and columns in Excel. The method I often use is to store metadata about the format of the spreadsheet in other tables, then use a transformation process to go from one to the other.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Hello all!
DataSet object is never disposed! I derived my own class from DatSet, added destructors to it then, and the problem is I NEVER get destructor called!
Is it right? I never get any of created objects of that class to be collected by GC.
Is it right? Or I miss something?
Thanks in advance.
Regards,
alexx.
|
|
|
|
|
Yes, you didn't wait for a garbage collection to happen that required your finalizer to be called.
The GC presently runs finalizers in a queue using a dedicated finalizer thread. An object is added to this queue (called the freachable queue by the CLR people and some of the documentation) when the garbage collector collects the object (the memory actually survives the garbage collection; the memory itself will only be freed on the next collection of that generation after the finalizer runs). If memory pressure isn't high enough, the GC won't reclaim the memory and won't run the finalizer.
Finalizers in .NET languages do not work in the same way as C++ destructors. If you need to dispose of resources as soon as the object goes out of scope, implement IDisposable and use a using block (in C#) or call Dispose directly.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hello all!
DataSet object is never disposed! I derived my own class from DatSet, added destructors to it then, and the problem is I NEVER get destructor called!
Is it right? I never get any of created objects of that class to be collected by GC.
Is it right? Or I miss something?
Thanks in advance.
Regards,
alexx.
|
|
|
|
|
Has anyone ever had luck type-casting them from standard classes before? ie. a "UserDataTable" from DataTable?
Even with matching constraints I get errors. Shouldn't it be possible?
|
|
|
|
|
If you've got a DataTable that's been returned from some general procedure which doesn't know about your derived classes, you can't cast it to a derived class - because it isn't one. The object's actual type is carried with it.
You should be able to write the data to an XML format using DataSet.WriteXml and read it back using a typed dataset's ReadXml method.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I am programming a program to use modem dialup to retrieve data from SQL 2000 Server...
What would be a good solution for the connection betweeb a client PC and the server running SQL Server 2000?
JW
DJ
|
|
|
|
|
I have an SQL Server 2k (personal edition) running on Windows 2000 Pro for testing.
I tried to connect from other PC running SQL server to this databse. However,
from SQL Query Analyzer on the local PC, I could not find the database once I clicked on the ... which is right to the SQL Sever: text box.
The connection between the PC and the Database machine is modem dialup. From either side, I can ping to each other without any problem.
Moreover, once I connected my PC to the intranet, I can access/login to any SQl server database which is within the intranet environment.
ANy help are greatly appreciated.
JW
DJ
|
|
|
|
|
The box that appears when you click the '...' button is filled using broadcasts to the local subnet, on UDP port 1434, or by using NetBIOS broadcasts. It's unlikely that this will work over a dial-up connection, because routers do not forward broadcast messages.
You'll need to specify the server explicitly. This may not work using names for the same reason as above, so you may need to use an IP address.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi all,
I'm encrypting some private information into a SQL but now I got
an issue where my users want to be able to perform searches on
these encrypted columns. I could limite them to exact searches but
for sure they will complain about that so I will have to provide
search where I can use the LIKE operator.
The encryption happens before I store the data into the database.
Any ideas?
Thanks in advance.
Alberto
OHSAH
|
|
|
|
|
Hello all,
I am developing an ASP application using SQL Server as my RDBMS. I need to create a new ulogin and user and assign the user to a specific database. I have done that and works ok. Now I need to create a few tables and views that only the new user can access and I go:
<br />
CREATE TABLE @myNewUser.[MY_TABLE_NAME] (...etc...etc...)<br />
Obviously this doesnt work. Can anyone tell me how to do this?
Thank you
theJazzyBrain
Excelence is not an act, but a habbit Aristotle
|
|
|
|
|
In a stored procedure where you pass in @newUserName and @tableName to the procedure:
<code>declare @stmt varchar(1024)
set @stmt = 'CREATE TABLE [' + @newUserName + '].[' + @tableName + '] ...'
exec @stmt
|
|
|
|
|
thanx...
theJazzyBrain
Excelence is not an act, but a habbit Aristotle
|
|
|
|
|
I'm developing a shopping cart using vb6. (ActiveX dll)
For db connectivity I'm using ADO 2.7
The database (free tables) in use for now will be FOXPRO (I know not the best choice)
At some point the databases will be converted to MSSQL.
My question is:
When the cCustomer class is created, can I open the connection to the database and closed it when class is destroyed (on session end)?
Or
Should I open and close connection as needed?
It just seem better to just do it ones, but I'm not sure on how much extra load it will be on the server.
There might be up to 500 people on the server at any given time...
Please let me know what you think
Thank you
Iluha
|
|
|
|
|
To do this project personally.
I would use a MS access DB (crap but suited)
Create your pages and then store the products buy within an Array which begins size one and then dynamically grows as you insert more items to the basket.
To dynamically increase the size of the array while maintaing the content of the array use "Redim"
Also when the person moves page to page store the array within a session
Atul
|
|
|
|
|
Holding a connection open to a database as you're thinking doesn't scale well.
Use a combination of "just in time" connections, caching (ASP.NET caching is pretty nifty,) and a session shopping cart using an ArrayList of order items should do the trick.
|
|
|
|
|
I had a DBA once who stored the UserId created by MSSQL in a table. After a while, usually after lunch, strange effects occured. People started to see other peoples data. After a while we figured out that when the connection is dormant for a while the connection drops and a new one is created when needed. MSSQL does this all by itself.
So i dont think you can get a connection all to yourself, you share it with others. Perhaps there is a way to keep the connection alive but why would you want this.
HTH, Grtz,
Guus
|
|
|
|
|
hi,
i am using ms access.
how can i select only 2nd record in the records returned?
"select top 2 .... " can only get 1st, 2nd record
"select * limit 2,3" can only use in mysql.
any method to get the 2nd record in the records returned?
pls help!
thanks,
jim
|
|
|
|
|
If you use an ORDER BY in your query, you could turn your original query with the TOP 2 into a subquery and select it again but reversing the direction of the ORRDER BY and setting TOP 1 on the outer query.
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
I populate my object with data from the database into arraylist. Later I perform add data using the ilist components to the object. The problem now is how the changes in the object will take effect on the database? Do I need to perform insert command to database and add into object at the same time.Please HELP!!!!
|
|
|
|