|
Hi:
Can anybody help me.
I want to export data from Filemaker to Sql Server.
Thanks in advance..!
Vikas Garg
Vikas Garg
|
|
|
|
|
Hi,
I have created a MS service that has to connect to my SQL server. But it never does. I use the exact same code that does the exact same thing that the service does, but it is in an application, and it works perfectly. The only difference that I see is the app is run by the user that is logged in but the service runs under SYSTEM. Here is the error the service is getting:
Error Message = ERROR [28000][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'DomainName\SystemName'.
I connect to the ODBC by using: DSN = "DSN Name"
DSN is configured to use the windows account, I also tested it and it works fine.
I am not able to find any pointers, it works as an application, but not as a service? Any solution will be greatly appreciated.
Thanks.
|
|
|
|
|
You're having impersonation problems. When your service runs, it runs as a service account (probably the IUSR account if it's a web service). When the application runs, it runs as you, the logged-in user. You have access, the service account doesn't. Your DSN doesn't seem to specify a username or password.
You can do a couple of things:
1. Change the service to run as someone who does have access. If it's a web service this could have consequences on other web services running on the same machine.
2. Explicitly impersonate someone else in your connection string. Put the username and password of someone who does have access after the DSN param in the connection string.
I think there are other more complicated options.
s}
|
|
|
|
|
Hello every body,
I have a problem. I've just creating a database application that use the SQL server 2000 engine but I want, when deploying the application, not to install the MS SQL SErver 2000 on the user's machine. how can i do? please help! (sorry for my poor English)
|
|
|
|
|
I don't have a clue what is it that you want....
hablas español?
|
|
|
|
|
It mean the user of my application not to know what database engine is using by the application and when installing it, not to use te MS SQL Server CD for installing the database engine!
|
|
|
|
|
Can you not just change the connection string to point to whatever remote server the database is hosted on?
|
|
|
|
|
Thank you. I'd already try the way you propose me and it works. But You know, if you are using a database application such as Sage Saari(Comptabilité) you don't know the database engine used with. that's what I want to do.
|
|
|
|
|
So you're saying that you want to install an application that was written for MSSQL, but not use MSSQL as the database engine?
|
|
|
|
|
I'm not really getting you here, but i think you might want to look at NHibernate and the DAO design pattern[^] to implement a datalayer on your application that abstracts the actual access to the data.
The client will still need drivers installed on their machines to allow them client access to whatever DB you decide to use...
|
|
|
|
|
if I try to explain: the application will use MS SQL server but I want that, in my install CD, when installing the application, the engine be insatlled with but not Entreprise manager and the other SQL application that I don't need to use my application. Only the engine
|
|
|
|
|
Is this being installed on the server? I don't think you can redistribute the SQL server engine (without getting a slap from MS) and i have no idea how... If you are installing on client machines, then all they need is the client drivers (ADO/ADO.net), which pretty much all Windows based machines will have.
Apart from that, I don't know and it's Friday afternoon...;P
|
|
|
|
|
If I'm installing it on the client machine, how can I write the sqConn.ConnectionString? because in it we have only the name of the database and not the full path of the file?
|
|
|
|
|
Well you should have it so it is configurable (i.e in .config file) and then during your installation you'll need to provide the user some way to enter the path to the DB which you then translate to connection string and save in your config.
I'm not a windows app programmer, but if you post this in the C# forum, you might get a more informative answer (about installers, etc.).
|
|
|
|
|
Well, what I know about MS SQL Server Desktop is that if you want to use it you must register first(you need a passport account) in order to have permissions. Even you if find a way to hide the set up process you need to ask the user to register.
However, I don't think there's way to hide the installation process of SQL Server Desktop...
|
|
|
|
|
How can I get the SQL server version from the code ?
|
|
|
|
|
usid this query "select @@version"
Last modified: 02-June-2006 3:32:18 AM --
|
|
|
|
|
Hi,
I have a relativley large/complex typed dataset that contains 7-8 tables and some supporting relational tables (lookups) for many-to-many relations. A good exampel would be a dataset that contained the whole Northwind database with all tables and relations.
In my business logic I will retrive a populated instance of the dataset and perform some operations (adding/deleting/updating of rows in various tables...).
What is the best way to persist these changes back to the database (SQL Server)?.
Regards
Shine
|
|
|
|
|
This sounds like a good case for middleware. If you're using .NET, this is easy and fun.
Typed DataSet objects are probably the best way to do this. If you craft your SQL queries correctly, or, better yet, use stored procedures, you should be able to use DataReader objects to populate typed DS objects directly (and back). In development, using SQL Server's XML services and DataSet.ReadXml() and WriteXml() may provide you with good tracing and an idea of what's going into and coming out of your database.
|
|
|
|
|
Hi,
I have never written a trigger before. This is probably very simply, but I need some assistance:
The basic concept is as follows. When user puts values into Table One, a TRIGGER occurs and values are automatically put into Table Two:
Table One has 3 basic columns, and Table Two has 2 basic columns.
Table One
NumStart: 1
NumEnd: 3
Code: A
Table Two
Num: 1
Code: A
Num: 2
Code: A
Num: 3
Code: A
Thank you in advance for any help you can give.
Anne
|
|
|
|
|
Anne,
(I'm assuming SQL Server 2000.)
It looks like you're trying to insert and expand in the trigger. The body of the trigger has access to a table called "inserted" that contains the inserted values. Inserting is easy, but running your expansion is more difficult and poor form in a set-based language like SQL.
This does what you want:
<br />
create trigger mytrigger on tableone for insert as<br />
begin -- trigger<br />
<br />
declare<br />
@ptr int, -- your loop variable<br />
@code char -- what to insert each time<br />
<br />
-- probably can combine the next two lines if clever<br />
select @code = code from inserted<br />
select @ptr = numstart from inserted<br />
<br />
while @ptr <= (select numend from inserted)<br />
begin -- while<br />
<br />
-- consider a select .. into instead of next<br />
insert into tabletwo (num, code) values (@ptr, @code)<br />
select @ptr = @ptr + 1<br />
<br />
end -- while<br />
<br />
end -- trigger<br />
The motherhood-and-apple-pie stand on this, all else being equal, is that you should use neither a trigger nor the second table for this. It says that you should always avoid triggers unless there's no other solution (there is here), and you shouldn't store your data twice (table two simply repeats information you can find in table one). Instead, you should just store the start, end, and code, and craft a query that will give you a result set containing (1, A), (2, A), (3, A) that runs every time you want that result. I'm assuming you have a good business case for this though, like a performance enhancement or something.
Stephan
|
|
|
|
|
I have created a C# (.NET 2.0) database application working with SQL Server 2000. In my application I make use of the SQLDMO object of SQL Server. When i deploy my application, i have problems when it tries to load the SQLDMO object! And the application fails and also notifies me that the RPC service isn't available! With my application, i have also deployed ALL dependencies (including the Interop.SQLDMO.dll assembly)! Does anyone know what might be the problem here?
|
|
|
|
|
SQLDMO is ONLY loaded if you have installed the Sql Server tools on the computer.
In order to use SQLDMO on a desktop, you MUST have a license for it.
|
|
|
|
|
SQL Server is installed and licensed on the target machine! For that reason, i do not include the actual SQLDMO.dll file in the installation package. I only include the Interop.SQLDMO.dll assembly which is required to communicate with the SQLDMO Com object. And still, i'm having problems on the target machine!
|
|
|
|
|
I want to load a Datatable from a database in my application. While loading the data, i want to show
a progressbar.
How can i realize it ?
|
|
|
|