|
Thanks. But I dont think it's in the article though. I haven't gone thru it all yet. But read up to the section on ALGORITHM class implementation (stub code) and the include files mentioned are nowhere to be found.
DmhMemory.h and DmhMemory.cpp
DmhLocalization.h and DmhLocalization.cpp
ParamHandler.h, and ParamHandler.cpp
StaticAlgorithmMetadata.h
dmalgo.h and oledbdm.h
And they're not in article or Analysis Services installation directory.
Norman Fung
|
|
|
|
|
my connection string
"server=localhost;initial catalog=MyDatabase;user id=;pwd=;trusted_connection=true"
but this string no longer works after installing SP2.
Just wondering if this is normal?
|
|
|
|
|
|
I have an access database, and I have a small program that is using an OLEDBDataAdapater to retrieve the information. The problem is that it pulls multiple items (which it must be able to do.) I need to be able to bind the results to a textbox or some control that allows for multiple selection with copy ability. Any help would be greatly appriciated. TIA
BTW the coding of the program is very simple.
oledbdataadapter1 (select string)
dsups1.clear()
oledbdataadapter1.fill(dsups1)
|
|
|
|
|
OK. I figured this part out, and was able to display the data in a listbox. Now I need some help with being able to copy a selection from the listbox so that I can paste it into another program. TIA
|
|
|
|
|
Hi all!
I'm facing the challenge to distribute a SQLServer 2000 database with my application and was wondering what's the best way to do this.
Up to now I have been working with an access database that could simply be deployed by copying the .mdb file and adjusting the path in the connect string.
Now I have a working SQLServer 2000 Database on my development machine and need to transfer the database structure as well as several database entries onto a target machine.
I already tried creating a SQL script with Enterprise Manager, but didn't find a way to include the data in the database.
Saving the database and restoring it on the target machine doesn't work either because the restore process chokes when the SQLServer instance is different or installed in a different location.
I guess I'm missing something really trivial, can anybody help?
TIA,
mav
|
|
|
|
|
Do you have access to both SQL servers on a LAN. If so, I use the DTS Wizard (Import/Export) to transfer structure and data between servers.
Michael
CP Blog [^]
|
|
|
|
|
Thanks for your suggestion,
unfortunately that won't work in my case.
I'm distributing the application on CD and want it to install a complete SQLServer database on the target machine along with the application itself.
So no way will the target machine have access to the SQLServer on my development machine.
mav
|
|
|
|
|
mav.northwind wrote:
So no way will the target machine have access to the SQLServer on my development machine.
A lot depends on how much data. In the cases where I don't have direct access to the second Sql box. I tend to create a DTS package that exports to a CSV/XML or other file. Then have a DTS package that imports the data.
I often resort to having a VB app doing all the work as the DTS package can be created as VB source code
In other cases I have my data in an XML format and use SQL Commands to insert the data into another server.
There is also the BCP[^] tool that comes with SQL Server.
Michael
CP Blog [^]
|
|
|
|
|
Thank you, Michael!
I've actually found an application doing something like this here on CP, but with Graham's tip (see below) we can save all this 'voodoo' and just detach the live database, deploy it and than re-attach. Seems much easier.
Regards,
mav
|
|
|
|
|
You could detach the database on your development machine (you then get a standalone .mdf file), ship that with your app, and attach it to the target SQL server. That way, you'll get everything in the original database (because it's a direct copy).
Attching/detaching the database is easy - just use the sp_attach_db and sp_detach_db stored procedures.
|
|
|
|
|
Thanks Graham!
That really seems to be the easiest way.
Don't know why I missed sp_attach_db while browsing the documentation...
Best regards,
mav
|
|
|
|
|
Can we write in one script file that copy the .mdf file and .ldf file to the target machine and attach it to SQL server? This process should be done during or after the process of install the application. If it is possible, then it would be greate!!
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Sure, I've done it this way now.
It consists of two parts:
1) One InstallerClass that can copy files from the installation source directory to the target directory, replacing certain parameters in the process
2) Calling osql with the script created in step 1
The database files are included as regular files in the setup project and installed in a 'Database' subdirectory of the target directory.
Then I've added a custom action that, after all the files have been installed successfully, copies an sql template file to the target directory and fills in the real path to the database files.
Another custom action then calls osql -E -i <scriptCreatedInStep1> .
The script contents are just:
exec sp_attach_db @dbname='OurDatabaseName', @filename1='$(TRGDIR)\Database\MyDB.mdf', @filename2='$(TRGDIR)\Database\MyDB_Log.ldf'
go
and $(TRGDIR) gets replaced by the directory my program gets installed to.
Works great.
Regards,
mav
|
|
|
|
|
As an aside, you don't need to ship or attach the .ldf file. SQL Server will create one if you don't specify one as part of the sp_attach_db stored procedure. Might make the application slightly smaller when distributing it.
|
|
|
|
|
How could I use SQL/ASP to format a sting. I have the following:
10000 as a string - I would like to display it as 10,000 on my webpage.
Is this possible?
|
|
|
|
|
Try this:
NumberFormatInfo nfi = (NumberFormatInfo)CultureInfo.InvariantCulture.NumberFormat.Clone();
int[] groupSizes = {3,3,0};
nfi.NumberGroupSizes=groupSizes;
nfi.NumberDecimalDigits=0;
someTextBox.Text = i.ToString("N",nfi);
The NumberFormatInfo and CultureInfo are both found in the System.Globalization namespace.
"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
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Whenever my ASP.NET page attempts to read an Access database, I get an exception stating that the workgroup file could not be found. When I open the database it works perfectly. Testing the data source from inside DreamWeaver MX 2004 also fails, but I believe that actually uses the web server to do the test.
Could this be because I haven't set up the workspace while logged in as the web user? What else could cause this to happen?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have far away from .net for 4 month, but your question remind me when I use VB.net to connect to access database. Some techique need to specifies MDB file and MDW file. Then it will run properly. It it is possible, could you post your code here?
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Komsot man from SCN-CO wrote:
techique need to specifies MDB file and MDW file. Then it will run properly. It it is possible, could you post your code here?
I would, but my code is at home and I'm at work . I'm using an OleDBConnection to make the connection. From memory, the connection string included the provider (Jet 4.0), file name, user ID and password. I think the rest of the code is fine because I copied it from a book, and DreamWeaver fails with exactly the same connection string. I assume their code is correct
Thanks for your help though
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
seems you just need to specify the WMD file path in the system database variable..
check :
http://www.able-consulting.com/ADO_Conn.htm
http://www.Connectionstrings.com
|
|
|
|
|
Thanks
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I don't have ADOexpress from borland, but I want similar ADO components. I looked and found a few free ones, but only for Delphi. I found no free ones for C++ builder.
Does anyone know where to find what I am looking for?
Best wishes to all!
André
|
|
|
|
|
As I have this,
Dim CommandText2 As String = "Select SUM(PeriPrice) FROM Peripheral Where PCID='P0003'"
It sums up, and displayed "3399.000" on the datagrid.
But I want - 3,399.00.
Is there any way to do it?
Please help.
Thanks.
|
|
|
|
|
Select Right(Replicate('',10) + Convert(varchar(11),Convert(Decimal(10,2),SUM(PeriPrice))),11) FROM Peripheral Where PCID='P0003'
|
|
|
|