|
Hello ,
I just finished developing a program using Microsoft Desktop Engine with C# as the front end. Everything is okay on my system. But, on trying to deploy it on a different system it gives an error message that it can open the database.
This is my first time in using the Microsoft Desktop engine. All this while I have been using Access as my database engine and normally what I do after developing a program is to transfer the Database file in Access after installation to the client’s system and everything will be okay. But with the Desktop Engine what I did was to
1) Install it on the client computer
2) Transfer the Database file to the client’s system.
On running it was giving me message that it can’t open it.
I would be glad if anybody can show me how Microsoft Desktop Engine is deployed together with a program developed using it as the database engine.
Thanks in anticipation.
|
|
|
|
|
I don't think you can just up and transfer the database file. Try doing this instead:
osql -U[username] -P[upass] -S[database] -Q "BACKUP DATABASE [database] to DISK='c:\blah.backup'"
Move blah.backup to the new system, then run the same command with statement "RESTORE DATABASE [database] from DISK='c:\blah.backup'"
This should move the data + schema. You'll probably want to run it as sa, so a sample command is:
osql -Usa -Ppassword -SCOMPNAME\DBNAME -Q "BACKUP test01 TO DISK='C:\backup'"
HTH
-earl-
|
|
|
|
|
I'm guessing the user/login you're using on the production system lacks the access you have on your development system. Check user priviledges in the production database.
|
|
|
|
|
|
Hi Gurus:
i m new to Database programing in visual C++ . i know ADO in Visual C++ with MS Acces but getting confused to do with SQL Server, can any one help me .
Thanks in Advance .....
"Winner's don't do different things , they do things differently "
|
|
|
|
|
what is the problem exactly ?
www.connectionstrings.com[^] has the connection string you need.
after you open the sql db querying it is similar to access.
|
|
|
|
|
Great site! Thanks for posting it.
Some people think of it as a six-pack; I consider it more of a support group.
|
|
|
|
|
Folks,
I mostly do systems programming but got suckered into writing an app for a business run by my brother. This is a POS system which is backed by SQL Server. I'm using WTL on the client and ODBC (because it seemed simple / straightforward) to communicate with the db.
The question: there are a series of queries / reports that are run against the server. Exactly what is included in any individual report is variable -- eg a net sales report may or may not include gift certificates, employee discounts, etc.
My question: what is the best strategy for passing query results around? They can be (1) displayed on screen, (2) saved to CSV, or (3) printed. I expect there may be future options in the future, such as blowing them directly into QuickBooks.
Do people typically pass around the SQL statement handle and let the various consuming functions directly pull data via SQLFetch? That seems like a really bad idea. I currently have the SQL functions isolated and pull query results into an internal data structure -- vectors of structs right now. Unfortunately, I have to create structs for each query and pass around vectors. How do you deal with the fact that there are many optional fields -- just create an entry in the struct for each potential field? Also, what is the most convenient manner to deal with the fact that certain fields may be null?
Are there better ways to do this?
Thanks,
Earl
|
|
|
|
|
Hi every body!
Please tell how can i get data type of a field in table of DB!
Thanks!
xyz
|
|
|
|
|
Assume you are useing SQLServer 2000 , look for INFORMATION_SCHEMA.COLUMNS in SQLSerever online book. You have to query from it.
Mazy
"I think that only daring speculation can lead us further and not accumulation of facts." - Albert Einstein
|
|
|
|
|
Hello,
My name is Jon Ingram and I am 16 years old. I am not sure whether this message should be posted in this forum but i'll put it here anyway.
You might know the OJB tutorial at http://ojb-net.sourceforge.net/[^]. I thought that to fully understand Ojb.Net I would try and create a similar application. My problem is with referencing: after I have added a reference to ojb.Net.Framework, ojb.Net.Common, ojb.Net.Core and ojb.Net.Facade I get three Build Errors:
1.Error: The dependency 'nunit.framework, Version=2.0.6.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' in project 'Car.Ojb.Net' cannot be copied to the run directory because it would conflict with dependency 'nunit.framework, Version=2.1.4.0, Culture=neutral'.
2.Error: The dependency 'nunit.framework, Version=2.1.4.0, Culture=neutral' in project 'Car.Ojb.Net' cannot be copied to the run directory because it would conflict with dependency 'nunit.framework, Version=2.0.6.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77'.
3.D:\Documents and Settings\Administrator\Desktop\Programming\Car.Ojb.Net\Car.cs(12): The type or namespace name 'Facade' does not exist in the class or namespace 'Car.Ojb.Net' (are you missing an assembly reference?)
With errors 1 and 2 I added three references: nunit.framework.dll, nunit.uikit.dll and nunit.util.dll but then I get another build error:
Warning: The dependency 'nunit.framework, Version=2.0.6.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' in project 'Car.Ojb.Net' cannot be copied to the run directory because it would overwrite the reference 'nunit.framework, Version=2.1.4.0, Culture=neutral'.
The third error is very stange because I have already made a reference to Ojb.Net as shown below:
using System;
using System.Collections;
using Ojb.Net.Facade.Persist;
using Ojb.Net.Facade.Po;
namespace Car.Ojb.Net
{
///
/// Summary description for Car.Ojb.Net.
///
[Serializable]
class Car : Ojb.Net.Facade.Po.EditableObject
{
..........
Can someone who knows something about Ojb.Net help me?
Kind thanks to anyone who helps me!
Jon Ingram
|
|
|
|
|
ie, i have got a running live sql server.
Now i have installed sql server on one more system in my LAN. I want this new server to be a realtime backup of my live server. so that i can switch when ever there s a problem.
wots the easiest way.
and would be great if only datas(records are backed not the entire settings of the live server).
|
|
|
|
|
sanomni wrote:
wots the easiest way
Replication - though it certainly ain't easy, it will give you the ability to have real-time two-way synchronisation....
Can be a bit of a beast to set up though...have a document lying around if you're interested.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Is it possible to insert an unserparated string value for a date/time into a SQL datetime field? I'm trying to insert a string of "20040130101532", but SQL keeps telling me it can't convert the type. In the SQL Books Online that I have it's only showing an unserparated string format that contains a date. I can't believe that SQL wouldn't be able to accept a date/time value and only a date value. Is there anyway that anyone know to insert a string like above? Thanks.
- Aaron
|
|
|
|
|
I found a way to do it by inserting the string as "2004-01-30 10:15:32" it seems to work just as well as if it was unseparated.
- Aaron
|
|
|
|
|
Hi
I am trying to get some data from SQP procedure using XML Explicit as an output parameter. I am able to form XML using following statements:
---------********************
declare @CustomerID nchar(5)
select @CustomerID = 'ALFKI'
SELECT 1 as Tag,
NULL as Parent,
CustomerID as [C!1!customerid],
NULL as [O!2!orderid],
NULL as [O!2]
FROM Customers as C
where C.CustomerID = @CustomerID
UNION
SELECT
2 as tag,
1 as parent,
C.CustomerID,
O.OrderID,
O.ShipAddress
FROM Customers C, Orders O
WHERE (C.CustomerID = @CustomerID)
AND (C.CustomerID = O.CustomerID)
FOR XML EXPLICIT
---------********************
But, how do I save the ouput in an OUTPUT variable? Please advice.
Basically, the idea is to receive the xml in ASP.NET function and handle the xml there.
Thanks
Pankaj
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
AFAIK, you can't store it in an OUTPUT variable.
If you simply have the SELECT, you'll get a result set with a number of rows, each having one string field. You have to concatentate all the rows to get the full result.
You can simply use a SqlDataReader to retrieve the result.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
thanks for the pointer. I applied and it works great
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
I want to make a copy of my sql server 2000 database. I want all the tables, relationships, stored procedures, diagrams etc but none of the data .
How can this be accomplished ?
Try not! Do or do not, there is no try. - Master Yoda
|
|
|
|
|
Script the database....
Open Enterprise manager, and navigate to the database in question. Right-click, all tasks, Generate SQL Script. In the new dlg, click Show All, and select0 Script All Objects. Click OK and tell it where to save it.
This will generate a .sql file that can be run through Query Analyser / OSQL etc. that will create all entities in your database..
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Cool trick, tried on Northwind and the 11,000 lines plus of sql generated a slew of 'Invalid object name' errors. Probably just needs more investigation on my part though
Thank you.
Try not! Do or do not, there is no try. - Master Yoda
|
|
|
|
|
May possibly be because you (I assume) tried to restore it to the existing Northwind DB - the invalid object name ocurrs since you're trying to create duplicate objects IN_THE_SAME_DATABASE....
Again, from EM, navigate to the Databases node, right click, New Database. Configure the new DB, and in QA, select the name of the new DB in the drop down, or issue a "Use <dbname>" as the first cmd. Then run the script, and should be OK...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
You could possibly be right, I did create a new database and ran the script on it but I may have run the script twice.
In any case it did work and all the tables are present and correct.
Thanks for your help
Try not! Do or do not, there is no try. - Master Yoda
|
|
|
|
|
|
Hi everyone,
I would like some help on the following problem..
I m doing a course in database management using Oracle and my lecturer just hint that if we include some web development stuff (ASP or ASP.NET page)in our final assignment he might give us some extra marks.
I've already done all my SQL coding that create my database for the assignment and now i only need to do an ASP/ASP.NET page.
But the problem is that i havent had any knowledge before in ASP/ASP.NET. I went and bought myself a book (SAMS teach Yourself ASP.NET in 24 hours) but i dont really have the time to go through the book in detail, so i cant produce what the lecturer require us to do.
So i was wondering whether anyone here can give me some head start on wat i m require to do...
I need a ASP/ASP.NET page that ask the user for Employee ID, Start Date, and End Date..then it will match the ID and time frame of the 2 dates entered with the database in Oracle to procude a record of information on the employee.
From the book, i've learn how to display all the records from the employee table in the database but i still havent figure out how to display records on a particular employee which ID and dates was entered by the user. I have also read something on it that said something on ADO.NET that maybe can help to do this.
I can do all this in Oracle using SQL queries but i desperately need those extra few marks, so i m still trying to code the ASP/ASP.NET page to do this.
Any help would be very appreciated. Thank you.
------------------
b.o.toezz
|
|
|
|