SQLDMO Retreiving The ListInsstalledInstances For 64 BIT SQL Server
Apr 17, 2008
We are having a Windows Installer Program (32 bit) which calls the SQLDMO to get the list of installed instances in a 64 bit 2005 sql server machine. This fails as the windows installer tries opens up the 32 bit sqldmo and there is no instance of 32 bit sql server on this machine.
Is there any way by which sqldmo can return all 64 bit sql server instance when called from a 32 bit Application?
Hi, im trying to insert values into 2 different tables. The primary key in the first table is an auto increment field, which is then the foreign key in the 2nd table.Is there any way to retrieve the autogenerated value before performing the second insert. I have done some searching on the matter, but to no avail.I tried using LAST_INSERT_ID() but i get the error message that it is not a recognized function name. The other option is using @@identity but i cant see how to put that into my SQL statement.Can anyone help please.Thanks in advanceGareth
Hi,I am new to the mysteries of SQLDMO.I have written a program whereby the user can select which SQL serverto connect to on the Network and this works fine.I am using the SQLDMO.Application.ListAvailableSQLServers routine andthis works fine.However, the Server on the users machine appears as 'Local'I need to display the server name as the actual server name instead of'Local'Any ideas how to do this with SQLDMO.I know I could delve into the registry and get the name from there, butI want to avoid this.CheersAlex
I run into a problem which I cannot connect to the database using SQL Server 2000 Enterprise Manager. The SQL Server 2000 was working well until I hook a SQL Server 7.0 application to it. The error message: "General OLE Error 16386, You must upgrade your SQL Enterprise Manager & SQL-DMO (SQLOLE) to SQL Server 2000 (SQLDMO) to connect to this server". I checked fixed in the sp1 for SQL Server 2000, and found no entry. In MS support website and found nothing. Need help from someone who has experience on this. Thanks in Advance.
hi i have a project and i want make thats; 1-)The list All SQL Server(s) in my network to dropdrown list(that's ok) 2-) the list all databases to selected sqlserver(that's ok) 3-) the list tables to selected database(i cant)
i wrote my source kod please help me
1-) Dim mDMOApp As New SQLDMO.Application Dim mNames As SQLDMO.NameList Dim t As Integer
mDMOApp = New SQLDMO.Application mNames = mDMOApp.ListAvailableSQLServers() lstServers.Items.Clear()
For t = 1 To mNames.Count lstServers.Items.Add(mNames.Item(t)) Next
2-)
Dim server As New SQLDMO.SQLServer Dim db As SQLDMO.Database
server.Connect(mysqlserver, "xxx", "xxx") For Each db In server.Databases lst.Items.Add(db.Name)
I am a new SQL Server developer using Visual Basic 6 Professional Edition. I am using ADO and SQLDMO to develop my application. The SQL Server is Version 7.0, SP2 and SP3 (two different servers).
I am having difficulty gaining access, using ADO, to databases I create using SQLDMO. I create the database, create the DBFILE object, create a login and attach it to the database, create a user, assign the created login to the user, and assign the created user to the 'db_datareader', 'db_datawriter' and 'public' roles. the login object was set to 'standard', not NT. the SQL Server is set to 'mixed' NT -SQL Server login mode. Thw SQL Server is running under the 'system account'. Using SQL Server Enterprise Manager, everything looks OK. An attemp to connect using the ADO connection object fails, giving an error of Login failed for user 'engbom3admin'.
Connecting to the SQL Server using SQLDMO uses the 'sa' user name with a blank password.
I can successfully connect to the created database using the ADO connection object using the 'sa' user name and blank password. Using the SQL Server Enterprise manager, I cannot see anything at all different between the 'sa' and my created 'engbom3admin' user. I've manually set the created user to have 'db_owner' roles, etc. Same result. I'm stumped. I've read all I can gather from the Microsoft SQL Server books. I'm still stumped.
I would greatly appreciate any help, information or tips you could provide. Thank you in advance.
Sincerely, Bob Wohlers SVP, IS Datamax Corporation
SQL question here: I am setting up a blog, and I would like the data list to default to the most recent post ONLY. How would I define the filter to get the most recent post? I have a publishing date in my table, and I can sort the post, but I have no clue how to select just one row to display.
I can get it to work by adding a dropdown list the is bound to the publishing date column, then retreving the post based on the control, but I don't want to use the control. (Making the control not visible is not an option.
I have an app that needs to retrieve the list of tables in an SQL database. I see that there is a way to do this with the OLEdb provider (GetOleDbSchemaTable() ), but I can't find a sibling method in SQL. IS there one/ Any Ideas?
I am storing images within and image field in sql, however when I go to get the data I have two issues.
the first issue is that my image is linked to information on another table but the only way that i have seen getting the image back is to do a:
response.binarywrite(mydatareader.item("image"))
but i am hoping to be able to find a way to use the template functionality with datagrid to align the picture with the information on the table. i am storing the image type and size with the image as well.
the second problem might be related to the load, i am not sure. sometimes, for some images and it just shows the frame of the image with the red x in the middle. The load appears to work (no errors) but since we cannot view them properly we dont know.
Our application wants to store all data in sql so that we can secure it and relate it to projects. in addition, we hope to be able to use this function to upload all sorts of binary documents from jpg, gif, doc, xls, visio, and others as we can. any issues with that process???
we would like to be able to display them directly in the browser where we can but all users have standard office.
any suggestions on either and hopefully both of these situations? we have sort of hit a brick wall.
hi. I am at a new stage in our project and need to figure out how to insert/retreive MP3/Wav files. The way we want to do this is have the file stored on the harddrive while a link to its location is stored in the database.
I have posted this search in other newsgroups and have gotten a lot of philosophical responses, but what i really am looking for is code examples. Please, what i would like to see is "how" this id done in code. If you have done this on your site, i'd really appreciate your posting code here or emailing me examples. Or, if you know of a really good explainaition of how to go about storing/retreiving audio files in the way i mentioned using MS SQL Sever 2000, I'd be equally indebted.
I hope I have explained myself clearly. Thank you for your assistance!
Last week I discovered a server runing a sql database for a vendor application. Last year sometime one of our former employees created a dts to populate some data in peoplesoft from this database. But, over this last weekend, the vendor came in and uninstalled and reinstalled sql server and only restored their specific database. All I have is backups of msdb and master and I'm not sure how to restore our dts package. Any clues would be appreciated.
Hi all I have the following table schema and their details as follows:
Code Block CREATE TABLE #Tbl_Project ( ID varchar(40), Name varchar(50) ) GO CREATE TABLE #Tbl_User_Project ( ID int, ProjectID varchar(40), Role varchar(20) ) GO INSERT INTO #Tbl_Project VALUES('PRJ1','Project 1') INSERT INTO #Tbl_Project VALUES('PRJ2','Project 2') INSERT INTO #Tbl_Project VALUES('PRJ3','Project 3') GO INSERT INTO #Tbl_User_Project VALUES(1,'PRJ1','PM') INSERT INTO #Tbl_User_Project VALUES(2,'PRJ1','TL') INSERT INTO #Tbl_User_Project VALUES(3,'PRJ1','TM') INSERT INTO #Tbl_User_Project VALUES(4,'PRJ2','PM') INSERT INTO #Tbl_User_Project VALUES(5,'PRJ2','TL') INSERT INTO #Tbl_User_Project VALUES(6,'PRJ3','PM') INSERT INTO #Tbl_User_Project VALUES(7,'PRJ3','TL') INSERT INTO #Tbl_User_Project VALUES(8,'PRJ3','TL') GO --Required Output --ProjectID ProjectName PM:TL:TM Ratio HeadCount --PRJ1 Project 1 1:1:1 3 --PRJ2 Project 2 1:0:1 2 --PRJ3 Project 3 1:0:2 3 DROP TABLE #Tbl_Project,#Tbl_User_Project
This is just sample of the values. The ratio obtained should be as follows: Assuming for a Project 1 there are 2 - PM's , 6-TL's , 15 - TM's then the ratio should be 1:3:7.5 . So please help me in this regard.
I have a serious problem struggling with sql query the problem is i have a table below
Sno CarId carcharacterstics Charactersticvalue
1. Mercides01 Color Red 2. Mercides01 EngineType Desile 3. Mercides01 Speed/Hr 350KM 4. Maruthi01 Color Red 5. Maruthi01 EngineType Desile 6. Maruthi01 Speed/Hr 250KM 7. BMW Gears Automatic 8. BMW EngineType Desile 9. BMW Speed/Hr 250KM
Now i need to retrieve the carid whose color is red and Engine type is desile the query i have written is
select carid from carchar where ((characterstics='Color' and charactersticvalue=Red) and (characterstics='EngineType' and charactersticvalue=Desile))
But I am not able to retrieve the values. I can retrieve the values correctly if i mention only one characterstics and its value but i cant retrieve if i mention more than that
fields: assassinid int, identity, primary key assassinname nvarchar assassincallsign nvarchar knifekills int sniperkills int stealthkills int fibergarotekills int
supposed i want to retreive only those records whose type of kills is on a given list, how do i do that? the list is actually dynamic since the kill types is actually coming from a checkbox on my page: [] Knife Kills [] Sniper Kills [] Stealth Kills [] Fibergarrote Kills
supposed i will only check Knife Kills, it will only retreive those records whose knifekills > 0
or if i check Snipers Kills and Stealth Kills, then those records whose sniperkills and stealthkills is > 0.
Due to circumstances beyond my control, I have to restore a full database backup from October 1, 2005 and then over 4400 transaction logs to bring a database up to Jan 01, 2006 on a development server (storage team lost all daily full backups from 10/02/2005 to 01/01/2006). Since the backups were not taken on this machine originally, the information I would pull from the sysjobhistory tables to get the transaction backup names is not available. Does anyone have a link or a script to pull the filenames from the backup directory into sql server so I can build a dynamic script to apply the tran logs instead of running all 4400+ of them by hand? Thanks, Tom
I'm trying to figure out how to retreive connection strings from the machine.config instead of storing the conn strings in a *.dtsconfig file. The reason that I'm trying to use the machine.config is for the simple reason that I'll be able to manage all of the conn strings in one location on each server. (Instead of mutliple dtsconfig files.) Is it posible to utilize the machine.config in SSIS? If so, could someone explain how, or better yet, have an example?
The same as following Tree as you can see 1__ | 2__ | 4__ | 6 | __ 3__ 5
I need a query to return the following Result. I think it is possible only through Nested sub-Queries But i don't know how to do that Could any one help me.?
Could someone tell me how to get the data from all tables of the database in the form of insert script? We are moving our databse from SQL Server 2000 to SQL Server 2005. The scripts for the Database, Tables, Views , Procedures, Functions have been obtained and it is only the data that is remaining. Some are small tables with 5 to 6 columns but there are some with 50 odd columns. A friend of mine told me about a procedure that returns a dataset with INSERT statements by passing a table name as a parameter. Such procedure would be of great help.
I am having one querry regarding the same line. In my stored procedure i am fetching the data from one table containing upto 5 to 6 million rows I made use of index in my database but then also I cant optimise my execution time of that sp. Please help me out of this problem.
Hi, this may sound stupid, but is it possible to export only the SQLDMO librairies to install them on a server that does not have SQL server on it. It is only a test server that can connect to other servers that have SQL Server.
I am trying to write a database compare application for our SQL Server databases using VB and SQLDMO.
I find SQLDMO to be rather slow but on large databases with about 800+ tables, this loop eats up all of my abundant memory until everything crashes. On smaller db's it works fine but is a slower than I expected.
Dim Tbl as SQLDMO.Table Dim Col as SQLDMO.Column
For Each Tbl in DB.Tables 'DB was previously set For Each Col in Tbl.Columns Debug.Print Tbl.Name & "." & Col.Name Next Col Next Tbl
Here's a pic of what the app looks like so far. If it looks useful to you, let me know, I'll give you a copy if I can get it working better!
I am using SQLDMO.DLL for Backup & restore utility in C# application.
Following is the code :
SQLDMO._SQLServer srv = new SQLDMO.SQLServerClass(); srv.Connect("IBM0505d-040","sa",""); SQLDMO.Restore res = new SQLDMO.RestoreClass(); res.Devices = res.Files; res.Files = this.txtRestorefrom.Text; res.Database = "abc"; res.ReplaceDatabase = true; res.SQLRestore(srv);
While running above code it gives following exception :
"[Microsoft][ODBC SQL Server Driver][SQL Server]Database in use. The system administrator must have exclusive use of the database to run the restore operation.[Microsoft][ODBC SQL Server Driver][SQL Server]Backup or restore operation terminating abnormally."
I have a program using SQLDMO object.When I use it on my computer and I have install sqlserverit works OK,but when I move the program to another computer without sqlserverthe program runs error the error message is com exception 80040154can the proram using SQLDMO running on computer without installing sqlserver?BTW: my System is win2003,and the other is windows xp
I need to install sqldmo.dll and related files - so I can use SQL Objects. I've been searching the Internet and trying for hours to register the file on XP Client machines - but not go.
I have put the following files in the locations below:
sqldmo.dll Program FilesMicrosoft SQL Server80ToolBinn sqldmo.rll Program FilesMicrosoft SQL Server80ToolBinnResources1033 sqlresld.dll Program FilesMicrosoft SQL Server80ToolBinn sqlsvc.dll Program FilesMicrosoft SQL Server80ToolBinn sqlsvc.rll Program FilesMicrosoft SQL Server80ToolBinnResources1033 sqlunirl.dll System32 w95scm.dll Program FilesMicrosoft SQL Server80ToolBinn
I have also tried putting the files in System32 with the appropriate subdirectories - still not go. I cannot seem to get this to work.
If anybody has successfully installed sqldmo.dll for use on SQL Server 2000 client machines running XP, I'd be really grateful for a few pointers.
IS there a component/way of retrieving a list of SQL Servers or databases on your local network for SQL 2005/Express. The same way sqldmo worked for a .net project.
Hi,how to create an SQL DMO object in .net and use it to enumerate theproperties of Sql server. Can we use this object to list propertieswithout logging in to the server?