Hi All,
I want to use MS sql server edition 2000. I have installed the server. Now i
want to create the database on this server with tables and triggers. Can
please someone suggest me how to do this ?
Thanks a lot,
Dinesh
hello all during the instaletion i get an error message that SQL server can not start the service, after that the programm rolls instalation back.do someone knows what's going on?i use win xp pro.thank u for ur help.
I am having problems creating a table in my first database.
When I script:
CREATE TABLE ship (mmsi INT, time INT, longitude INT, latitude INT, cog INT, sog INT, heading INT, navsat INT, imo INT, name CHAR, callsign VARCHAR, type INT, a INT, b INT, c INT, d INT, draught INT, dest CHAR, eta INT); I am returned with an error 1064 with regads to the attributes from "Typ" onwards.
hi, i'm trying to create a table and populate it with data from another database residing on the same server. i've done this on oracle using tables within the same database and am just making a first effort with the added twist of a different database. this is what i've been doing so far...
CREATE TABLE facility_dimension ( fac_id INT IDENTITY(1,1), tri_fac_id CHAR(17), fac_nameVARCHAR(100), street VARCHAR(100), city VARCHAR(100), county VARCHAR(50), state VARCHAR(4), longitude REAL, latitude REAL, PRIMARY KEY(fac_id) ) SELECT tri_facility_id, facility_name, street_address, city_name, county_name, state_abbr, fac_latitude, fac_longitude FROM TRI_2004.form_1;
....where TRI_2004 is the other database and form_1 is the table. the result is creation of the new table and then the output of the secondary query. i'm assuming this can even be done but if it can't that would be helpful to know as well. thanks in advance!
I created database using SQL server and runs under Cassini. The creation of database is ok but I have a problem when I am creating the table in database. Whenever I execute the code to create the tables, it shows the error message like 'Server not found' or just hang there. Does anybody know why it hang while I am creating the table? Is it because of the code or it's the time out error. Pls help as I am very new to this area.
Hi Can anyone help me with the MSSQL following problem: I want to update the field "Date" with today´s date in a Tabel named Customers I want to click on a "button" that runs something like:
Update Date with Today´s date where CustomerName = TextBox.text
1. I am wondering if exist a tool to let me easily document my databases, unde MSQL. e.g.I want to create a doc file or better a html file with all my databases objects, descriptions, DDLs etc...
2. Another tool to create code patterns; I need a something that generate custom code patterns, but in VBScript or C#.
p.s. Sorry if i created this topic on another forum.
Thanks,
<u><b>Jack Bower</b></u> software developer IATAR Studio http://iatar.port5.com
I have a question regarding the dynamic sql. I have a script which which deletes all the foreign keys and re- creates it. So, I have created a table instead of a temp table. Now I need to create that foreign keys table in such a way that in which ever database I run the script, this foreign keys table should be created in that particular database.
For example:
IF OBJECT_ID('tempdb..keys','U') IS NOT NULL DROP TABLE keys CREATE TABLE keys.[@sourceserver],[@database]. (RowId INT PRIMARY KEY IDENTITY(1, 1), ForeignKeyConstraintName NVARCHAR(200), ForeignKeyConstraintTableSchema NVARCHAR(200), ForeignKeyConstraintTableName NVARCHAR(200), ForeignKeyConstraintColumnName NVARCHAR(200)
A couple days ago, i posted a question on the Access boards.Here (http://forums.databasejournal.com/showthread.php?s=&threadid=36511)
Long story short, instead of filtering the results Locally, returned by query run locally on linked tables in an access front end, seems we should filter remotly. Seems easier and more secure.
We still want to hand out MS Access front ends. The results of queries run by users must be filtered based on authetication and values in the tables they query. There would be two ways to accomplish this.
1 - Stored procedures, apprearing as queries in Access.
2 - Views, appearing as tables.
Stored procedures are sure to work, but somewhat a hassle, sine we have to write code for each.
Views seem to be the simplest approach. we only need to build an SQL statement representing the new table. yet again, we have not done any constructive filtering. Is there a way to pass arguments to views just like stored procedures?
An exemple could be :
SELECT field1, field2, field3 FROM edu_details WHERE ID_department = @usr_dept AND ID_Division = $usr_div
usr_dept and usr_div being fields in the queried table(or course) AND auth information.
i am newly installed my client server from there i suppose to access the application.... when i clicked on the application icon it showing he following message:
Please note down the Error and Call EDP!!!! Error number->[-2147467259] Error Text->[[DBNETLIB][ConnectionOpen(Connect()),]SQL Server does not exit or access denied,]
am getting the above error..... can any one through your view plz.........
ENV: windows 2003 small business server, MSSQL (server) windowsXP (client)
its working fine with all other client mechines.........
I am trying to use the following Query to create the table Agents and add rows to it.
USE REMAXCLASSIC; IF OBJECT_ID ('dbo.Agents', 'U') IS NOT NULL DROP TABLE Agents; GO CREATE TABLE Agents
[Code] ....
I get the following error messages: Msg 102, Level 15, State 1, Line 34 Incorrect syntax near '0.25' Msg 105, Level 15 mark after the character string ');
I'm wondering if there is some sql I can run to check properties on a table. This would be used to verify things like data types, allow nulls and default values have been set to avoid mistakes. This could be done manually one table and one column at a time, but it would be a lot easier to look at it in the results window.
My SQL is extremly rusted so I need some help with a very basic function. I have a character field which is built up using a category code + '-' + number. The problem I have is that the category codes are all different lengths and the items were added using 9 instead of 09. I'm trying to clean up the data so that the same item with e.g. category code DZ20 cannot be added as DZ20-1 and DZ20-01. How do I find the position of the '-' in the Query Analyser for MSSQL 2000?
I am trying to design a SSIS DTS package that imports an Excel named range (acts as a table) into a SQL Server 2005 database table. The direct import (using the import/export wizard) works fine, but I need to use a DTS package with a data transformation step. The DTS fails to create/replace/or update the SQL Server table. Suggestions?
I am using SQL Server 7.0..When I go to the Enterprise Manager and try to Create a New database, the Datafile defaults to C:MSSQL7 and the Transaction Log Defaults to C:MSSQL7 folders...
Is there some setting on the Server itself so that the defaults are different..Like D:Data etc....
I know I can type in the correct folder but my main question is that is there some setting in Enterprise Manager or some System Table so that a new database and its Transaction Log is created on a different default drive..
This is the first time I ever touched on SQL database. Is there any tutorial or guide online that I can read on. Because at the moment I don't even know where to begin. I don't even know how to create the tables in SQL server.
Basically I need to transfer data from MS access tables and save them in the SQL server. Say, hourly basis. But I only want the new data at every hour. So how should I go about the procedure?
By the way, is there a limit to the size of the SQL server? or I can have unlimited amount of data?
Right now I am writing to a sql table during a process where the end user starts entering the contents for a file that is going to be generated once he finishes entering the data, but the problem is that if more than one user is doing the same process the data would get mixed up. To avoid this I thought in creating a temporary table (its name will consist of a string and the current date time).
I would like to see any tutorial about creating and working with temp tables. Or if you have any suggestions, I will appreciate them. Thanks
I have a form with a drop down box so the user can select a quote.. When a quote is selected i need to populate a table of all the records associated with the quote id. I need the table to be created in such a way that the user can add new rows, delete rows and edit the data. Then all of the changes need to be written back to the database. Whats the most efficient/best way of doing this and if you have any ideas can you explain them as thoroughly as possible! I'm currently upgrading an access database to a sql server back end with an asp.net client and it's taking me a while to get to grips with all the changes!Thanks in advance,Chris
I have used to following Microsoft supplied code to create a link to SQL server from access: (Is there a way to use a DSN-less connection at comment below? If not is there a way to create a DSN using code?
------------------------------------------------------------------------- Sub ClientServerX3() Dim dbsCurrent as Database Dim tdRoy as TableDef Set dbsCurrent = CurrentDb Set tdfRoy = dbsCurrent.CreateTableDef("Roy")
When creating a table I want to be able to specify not only the db to create it on but also which server to create it on. I have two servers that are linked together, I can view all data without issue.
Doing further research it looks like with the create table command you can tell it the new table name and the database but you can't tell it which server to use. Is there a way of doing this?
Example :
CREATE TABLE LAPTOP.database.dbo.tableName (a INT) gives the following error:
The object name 'LAPTOP.database.dbo.' contains more than the maximum number of prefixes. The maximum is 2.
I am new to linked servers so basically my question is, how do you point to a server within sql before I execute the create table command?
I have two problems on creating new SQL server database in Visual Web Developer 2005 Express using SQL server 2005 Express.
The 1st problem: (It is resolved)
After installed SQL Server 2005 express and Visual Web Developer 2005 Express. When I tried to create a SQL server database in VWD the following error occurred:
"connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=49251"
I was stuck with this problem for few days. I did several times of install/reinstall of VWPExpress and SQL server Express, made very sure following proper de-installation sequence as specified in the release readme. But it did not resolve the problem.
Latter I found out that if I login with another Windows XP user account, I don't get the problem.
Changing the security authority of XP file systems and IIS didn't help.
And to prove that I was doing the installation correctly, I tried a new installation of the VWDExpress with SQL server 2005 express in another machine, it worked and I could create new empty SQL database.
After 2 days of frustrating changing of options, parameters, server names, messing with the registry etc.... Finally, I found a way to overcome this problem.
The solution is:
In Visual Web Developer 2005 Express, select:
Tools -> Options -> Database Tools -> Data Connections,
Change the setting: "SQL Server Instance Name (blank for default)" to "SQLEXPRESS". (where SQLEXPRESS is the default server instance name)
That solved this 1st problem.
I still don't know the exact reason for this problem. But I recalled I did installed the VWDExpress few weeks ago, I might have installed it without selecting SQL server 2005 express at that point. I guess the subsequent install/re-install did not clean up those junk in the registry.
I still have the 2nd problem:
The "Create new SQL database..." option is always grayed out when I right click on the Data connections in the "Database Explorer" tab.
I have a bypass for this difficulty for time being:
I have to do it by using the "Add connection....", put in the server name: "myserver/SQLEXPRESS" and a new database name.
can i create a table within the aspnetdb.mdf??? I created a database from SQL server set up wizard, and the database i make copy exactly what a aspnetdb.mdf(from tables to stored procedure) has..Can i change or add some files,tbles and stored procedure to it... I'll using SQL Express Edition... can i know what is the best way to implement the database i created if im going to setup ,manually my database (without set up wizard)can I copy the tables and stored procedure in aspnetdb.mdf in my database?? thanks for the answer... thanks and more power...
I have created a new server registration called 'MASTECH' with this registration I have created a database called 'youngerNow' As far as I am aware, no username nor password have been created.
I wish to access the database through asp.
I attempt to create connection with below code
strConn = "Provider=SQLOLEDB; Data Source=mastech; Initial Catalog=youngerNow" Set Conn=Server.createObject("ADODB.Connection") Conn.Open strConn Conn.Close
however I am getting the below error.
Error Type: Microsoft OLE DB Provider for SQL Server (0x80004005) Login failed for user 'IUSR_MASTECH'. Reason: Not associated with a trusted SQL Server connection. /younger now/books.asp, line 199
Hello all, I am new to MS SQL Server and am having troubles figuring out how to create a new database file. I have installed everything I can and and still cannot find any where to add a database file. I am upgrading from Access to SQL and feel like I am missing something... I will eventually need to create a couple of SQL databases and connect from Classic ASP and ASP.net in different applications. Before I worry about how to connect I need ot create something to connect to.
Any help would be greatly appreciated. Thanks Panhead
Hi all, I'm new to sql server ce and would like to know how can I create the sdf file?
Is it the sdf file have to be published from sql server 2005? Are there any other ways to do? Coz I planned to write a win32 application to create the sdf file then deploy it the mobile device, but I found I cannot add the System.Data.SqlServerCe reference into the win form in Visual Studio.
I have a newbie question here. I have a SQL Server Database and I need to create a column that displays the row number. I tried adding an Identity Primary Key which worked until a row got deleted and the count was off. How do I create a column that displays the row number and recounts when a row is deleted. Thanks!
AA!I am having problems on creating table through Enterprise Manager. Itgives me Error 1038 i.e. is as followsUnexpected ErrorODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot useempty objector column names. Use a single space if necessary.
In one of my applications running on a MSSQL database, I need to issue a select call to an Oracle database to pull information into my application.
To accomplish this,
1. the ORacle Admin has created a view of the Oracle database for me. 2. I have installed the Oracle client on the SQl server box. 3. A friend has told me that one way to accomplish this is create a linked server from SQL to use OLE/DB for Oracle to connect to the Oracle database 4. So I create the linked server successfully; create the server login sp_addlinkedsrvlogin successfully 5. When I go to query the database, I get the error below:
Server: Msg 7399, Level 16, State 1, Line 1 OLE DB provider 'MSDAORA' reported an error. [OLE/DB provider returned message: The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 (or greater) client software installation.
You will be unable to use this provider until these components have been installed.]