Showing posts with label created. Show all posts
Showing posts with label created. Show all posts

Friday, March 30, 2012

MS SQL7 (Desktop) error

Hi,
I am getting error 1802, CREATE DATABASE failed. Some file
names listed could not be created. Check previous errors.
I have Windows 2000 professional installed on my PC.
I am installing remedy 5.1 that uses MSSQL server 7 and I
am getting the error above on remedy instalation...
Any idea'
ThanksI suggest you talk to the vendor of remedy. SQL Server returned more error
messages and you really need those error messages to see what the problem
is.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Taiser" <anonymous@.discussions.microsoft.com> wrote in message
news:1b8c01c3ff4d$64d17880$a601280a@.phx.gbl...
> Hi,
> I am getting error 1802, CREATE DATABASE failed. Some file
> names listed could not be created. Check previous errors.
>
> I have Windows 2000 professional installed on my PC.
> I am installing remedy 5.1 that uses MSSQL server 7 and I
> am getting the error above on remedy instalation...
> Any idea'
> Thanks

MS SQL7 (Desktop) error

Hi,
I am getting error 1802, CREATE DATABASE failed. Some file
names listed could not be created. Check previous errors.
I have Windows 2000 professional installed on my PC.
I am installing remedy 5.1 that uses MSSQL server 7 and I
am getting the error above on remedy instalation...
Any idea'
ThanksI suggest you talk to the vendor of remedy. SQL Server returned more error
messages and you really need those error messages to see what the problem
is.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Taiser" <anonymous@.discussions.microsoft.com> wrote in message
news:1b8c01c3ff4d$64d17880$a601280a@.phx.gbl...
> Hi,
> I am getting error 1802, CREATE DATABASE failed. Some file
> names listed could not be created. Check previous errors.
>
> I have Windows 2000 professional installed on my PC.
> I am installing remedy 5.1 that uses MSSQL server 7 and I
> am getting the error above on remedy instalation...
> Any idea'
> Thankssql

MS SQL: syntax error in create table sql

Using Management Studio (for MS SQL server 8) I had created a table, given a primary key and created a unique key.
I then had the management studio "script 'create' to file" and it saved an SQL statement (below).
I then dropped/deleted the table and tried to execute the creation statement.
It says "Incorrect syntax near '('. " and references the block connected with the "WITH" statement. (Actually both of them cause the error and removing them gets rid of it.
Is there a way to keep the information contained in the WITH statement in my table creation SQL? Is it even required info?

Code: ( sql )

    USE [MyProducts]GO/****** Object: Table [dbo].[Category] Script Date: 10/12/2007 11:22:52 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Category]( [CategoryID] [int] IDENTITY(1,1) NOT NULL, [Name] [varchar](50) NOT NULL, [CategoryNumber] [int] NOT NULL, [ModifiedDate] [datetime] NOT NULL, CONSTRAINT [PK_Category] PRIMARY KEY CLUSTERED ( [CategoryID] ASC ) WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY], CONSTRAINT [IX_UniqueCategoryNumber] UNIQUE NONCLUSTERED ( [CategoryNumber] ASC ) WITH ( PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON ) ON [PRIMARY]) ON [PRIMARY] GOSET ANSI_PADDING OFF
Usually you never use With statement while creating a table.

Remove this statement and create table without it then go to table definition and see it should be picked by default.

Good Luck.|||it "appeared" to create correctly without the WITH statements.
I was just bothered by the management studio auto-createing the statement then telling my there were syntax errors. The msdn help on the T-SQL for it shows WITH statements in the smae style.
All well, I'll just remove them.

Thanks.|||You can change some settings but not all.
Most of them are server level settings and can not be changed and just read only.

For example you see ON [PRIMARY] and it allows you to put data on one device and indexes on different devices or even spread tables among several devices but server should see your other devices first before you are trying to create something on them. So it is available but for people who know what they doing
You are doing grate so good luck.

MS SQL Table JOIN with Oracle Table

I've got an Oracle table that I need to JOIN with a SQL table, and I've created the two datasets to pull the data I need. Is there any way Reporting Services can put them together for me?

No, SSRS cannot join data in two datasets.

Why not link your Oracle table into SQL, then write a view JOINing the data there...you could then provide the view to SSRS as a data source...

|||We tried it, but it was way slow. It also means installing the Oracle client on the SQL box and we're trying to avoid that if we can for security reasons.|||Not too much else you can do -- Although you could store your Oracle data in an SSRS cube...as long as the data wasn't too dynamic could get a good response that way at the cost of having to copy data over in the first place

MS SQL Srv 2000 and extended stored procedures

hi,
I have created my own dll file that I would like to use in sql 2000 as an
extended stored procedure. I have checked the dll is written correctly (I ca
n
use it in other application). The dll file is created in C# (Visual Studio
2005).
Unfortunatelly I cannot use it in sql as the extended procedure. I am
getting error: Cannot find the function <<f_name>> in the library
<<path\library.dll>>. Reason: 127(error not found).Extended procedures need to be written in C or C++ (or Delphi, so I've heard
). A language that can
create classic DLL files, not any of the modern fancy COM dlls. Also, SQL Se
rver 2000 doesn't
support hosting any type of CLR code, whether through xp or sp_OACreate, or
whether with or without
any wrappers.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
> hi,
> I have created my own dll file that I would like to use in sql 2000 as an
> extended stored procedure. I have checked the dll is written correctly (I
can
> use it in other application). The dll file is created in C# (Visual Studio
> 2005).
> Unfortunatelly I cannot use it in sql as the extended procedure. I am
> getting error: Cannot find the function <<f_name>> in the library
> <<path\library.dll>>. Reason: 127(error not found).|||Hi
This may be of interest:
"Using extended stored procedures or SP_OA stored procedures to load CLR in
SQL Server is not supported"
http://support.microsoft.com/default.aspx?scid=322884
Regards
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uBcPMTWwGHA.3264@.TK2MSFTNGP03.phx.gbl...
> Extended procedures need to be written in C or C++ (or Delphi, so I've
> heard). A language that can create classic DLL files, not any of the
> modern fancy COM dlls. Also, SQL Server 2000 doesn't support hosting any
> type of CLR code, whether through xp or sp_OACreate, or whether with or
> without any wrappers.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
>|||so is it possible to create an extended stored procedure in Visual Studio
2005 (C++)?
"Michael Epprecht [MSFT]" wrote:

> Hi
> This may be of interest:
> "Using extended stored procedures or SP_OA stored procedures to load CLR i
n
> SQL Server is not supported"
> http://support.microsoft.com/default.aspx?scid=322884
> Regards
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:uBcPMTWwGHA.3264@.TK2MSFTNGP03.phx.gbl...
>
>|||"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:8F880F51-DD0E-4FC9-8887-88A805920AC9@.microsoft.com...
> so is it possible to create an extended stored procedure in Visual Studio
> 2005 (C++)?
>
Yes, but it's much easier and safer to use SQL 2005 where you can use your
C# code inside the database.
David|||Can you show me how to do that? plz
"David Browne" wrote:

> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:8F880F51-DD0E-4FC9-8887-88A805920AC9@.microsoft.com...
> Yes, but it's much easier and safer to use SQL 2005 where you can use your
> C# code inside the database.
> David
>
>|||"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:884D5F80-4D8F-4252-824A-2B2438330B76@.microsoft.com...
> Can you show me how to do that? plz
>
Programming SQL Server 2005 Using the .NET Framework
http://msdn.microsoft.com/sql/learn...lr/default.aspx
David

MS SQL Srv 2000 and extended stored procedures

hi,
I have created my own dll file that I would like to use in sql 2000 as an
extended stored procedure. I have checked the dll is written correctly (I can
use it in other application). The dll file is created in C# (Visual Studio
2005).
Unfortunatelly I cannot use it in sql as the extended procedure. I am
getting error: Cannot find the function <<f_name>> in the library
<<path\library.dll>>. Reason: 127(error not found).Extended procedures need to be written in C or C++ (or Delphi, so I've heard). A language that can
create classic DLL files, not any of the modern fancy COM dlls. Also, SQL Server 2000 doesn't
support hosting any type of CLR code, whether through xp or sp_OACreate, or whether with or without
any wrappers.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
> hi,
> I have created my own dll file that I would like to use in sql 2000 as an
> extended stored procedure. I have checked the dll is written correctly (I can
> use it in other application). The dll file is created in C# (Visual Studio
> 2005).
> Unfortunatelly I cannot use it in sql as the extended procedure. I am
> getting error: Cannot find the function <<f_name>> in the library
> <<path\library.dll>>. Reason: 127(error not found).|||Hi
This may be of interest:
"Using extended stored procedures or SP_OA stored procedures to load CLR in
SQL Server is not supported"
http://support.microsoft.com/default.aspx?scid=322884
Regards
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:uBcPMTWwGHA.3264@.TK2MSFTNGP03.phx.gbl...
> Extended procedures need to be written in C or C++ (or Delphi, so I've
> heard). A language that can create classic DLL files, not any of the
> modern fancy COM dlls. Also, SQL Server 2000 doesn't support hosting any
> type of CLR code, whether through xp or sp_OACreate, or whether with or
> without any wrappers.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
>> hi,
>> I have created my own dll file that I would like to use in sql 2000 as an
>> extended stored procedure. I have checked the dll is written correctly (I
>> can
>> use it in other application). The dll file is created in C# (Visual
>> Studio
>> 2005).
>> Unfortunatelly I cannot use it in sql as the extended procedure. I am
>> getting error: Cannot find the function <<f_name>> in the library
>> <<path\library.dll>>. Reason: 127(error not found).
>|||so is it possible to create an extended stored procedure in Visual Studio
2005 (C++)?
"Michael Epprecht [MSFT]" wrote:
> Hi
> This may be of interest:
> "Using extended stored procedures or SP_OA stored procedures to load CLR in
> SQL Server is not supported"
> http://support.microsoft.com/default.aspx?scid=322884
> Regards
> --
> Mike
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:uBcPMTWwGHA.3264@.TK2MSFTNGP03.phx.gbl...
> > Extended procedures need to be written in C or C++ (or Delphi, so I've
> > heard). A language that can create classic DLL files, not any of the
> > modern fancy COM dlls. Also, SQL Server 2000 doesn't support hosting any
> > type of CLR code, whether through xp or sp_OACreate, or whether with or
> > without any wrappers.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> >
> >
> > "Chris" <Chris@.discussions.microsoft.com> wrote in message
> > news:17231DDF-B357-4227-94E1-D94C57AB54CC@.microsoft.com...
> >> hi,
> >> I have created my own dll file that I would like to use in sql 2000 as an
> >> extended stored procedure. I have checked the dll is written correctly (I
> >> can
> >> use it in other application). The dll file is created in C# (Visual
> >> Studio
> >> 2005).
> >> Unfortunatelly I cannot use it in sql as the extended procedure. I am
> >> getting error: Cannot find the function <<f_name>> in the library
> >> <<path\library.dll>>. Reason: 127(error not found).
> >
>
>|||"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:8F880F51-DD0E-4FC9-8887-88A805920AC9@.microsoft.com...
> so is it possible to create an extended stored procedure in Visual Studio
> 2005 (C++)?
>
Yes, but it's much easier and safer to use SQL 2005 where you can use your
C# code inside the database.
David|||Can you show me how to do that? plz
"David Browne" wrote:
> "Chris" <Chris@.discussions.microsoft.com> wrote in message
> news:8F880F51-DD0E-4FC9-8887-88A805920AC9@.microsoft.com...
> > so is it possible to create an extended stored procedure in Visual Studio
> > 2005 (C++)?
> >
> Yes, but it's much easier and safer to use SQL 2005 where you can use your
> C# code inside the database.
> David
>
>|||"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:884D5F80-4D8F-4252-824A-2B2438330B76@.microsoft.com...
> Can you show me how to do that? plz
>
Programming SQL Server 2005 Using the .NET Framework
http://msdn.microsoft.com/sql/learning/prog/clr/default.aspx
David

Wednesday, March 28, 2012

MS sql server query file

Hi All.

Have a nice day.

I have one file and all tables and fields created in this file, this file name is "db1.sql", i downloaded this file from a internet demo. and programmer give this file to use in the asp.net code. but i cannot open this file.

I want to use this file in my sqlepress, how can i import or bring to my sqlexpress server and use it ?

Please can you help me how can i use it?

Thanks.

Zahyea.

The file you download is a script file that contains the database and table creation, insertion of data, and views and procedures if any.

You need to execute the sql script. You can download SQL Server Management Studio for SQL Express that allows you to execute scripts against a SQL instance/database.

Monday, March 26, 2012

MS SQL server handling unicode data

Hi,

I want to fetch Unicode data from MS SQL server 2005.I have created one user with russian language characters.

Following is my code snippet:
-----------
wchar_t wchar1[55];
char VALUE[255];

while (rc != SQL_NO_DATA)
{
rc = SQLFetch(hstmt);
if (rc != SQL_NO_DATA)
memset(VALUE,0,255);
int length=wcstombs( NULL,(wchar_t *)&wchar1, wcslen(wchar1));
char* strChar = (char *) malloc((length +1 )* sizeof(char));
if (strChar != NULL)
{
count++;
memset(strChar,0, length + 1 );
int i =wcstombs(strChar, wchar1, wcslen(wchar1) );
printf( "i is %d\n",i);
}
printf( "The length is %d\n",length);
wprintf(L"\n <%s>", wchar1);
printf("\n simple char <%s>", strChar);
wprintf(L"\n simple char <%S>", wchar1);
}


-----------

CAn anybody help me ?
I think problem is in fetching of name.
Does anybody have working code for fetching unicode data from SQL server 2005.

Also I want query that will tell the locale setting of the server and also client?

Thanks--the sql server datatypes nchar/nvarchar/ntext are for unicode strings.

if you are using char/varchar/text in your columns, they won't be unicode.|||I know that nchar,nvarchar dayta types are unicode datatypes.
But C compiler is not able to resolve them.
It gives me error unkhown identifier.
Do u know which header files to be added for datatype nchar?
If you have any program for fetching unicode data,Please can you sned to me.
Its urgent.:eek:
I will be very thankful to you...|||Use the T-SQL COLLATE function and supply the corresponding collation for Russian.|||My problem is different.Actaully i want to support internationalization in my product which means product should support all the languages.
My product is for user and password management for MS SQL server 2005.
I want to fetch userdata in all languages.Not only in English(ANSI)
SO every time i will niether be aware of the collation setting of the database nor the locale setting when user is created.(language in which user has been created)
So in this situation I need generalise solution.
for example:
--------------
In Oracle using OCCI,we can set environment to OCCIUTF8.
Code for this is
Environment *env = Environment::createEnvironment(OCCIUTF8,OCCIUTF 8);
{
Connection *conn = env->createConnection(userName, password,
connectString);

This will work irrespective of NLS setting of server.

--------------

IN the same way is there any environmenet setting which needs to be done for supporting internationalisation?

I hope this will explain you all my realy problem.
Please help me....
I am using ODBC API for this.
If possible if anybody is having working code in c .........;)
that will be very helpful

waiting for your help...

Regards
Sam

Friday, March 23, 2012

MS SQL Server 2005 Express Edition and Reporting Services question...

Will my reports that I have created with "Microsoft SQL Server
Reporting Services Designers
Version" (This is the free RS designer) work on my new website with
SQL Server 2005 Express?
What I'm saying is, Can my website work with:
SQL Server 2005 Express Edition?
SQL Server "Express" Reporting Services?
Thanks for any help.
TrintNot sure about the version you are talking about. Is it the developers
version? There are very few differences between versions. Most differences
is not the report itself but other things like data driven subscriptions. A
report is the same between versions.
The main issue with SQL Server Express Reporting Services is not the report
you designed but other limitations such as where the data resides. If you
data is in Express Edition then you are fine. If you are wanting to report
off of data on another SQL Server box then you will have problems.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"trint" <trinity.smith@.gmail.com> wrote in message
news:1184073842.297362.294370@.n2g2000hse.googlegroups.com...
> Will my reports that I have created with "Microsoft SQL Server
> Reporting Services Designers
> Version" (This is the free RS designer) work on my new website with
> SQL Server 2005 Express?
> What I'm saying is, Can my website work with:
> SQL Server 2005 Express Edition?
> SQL Server "Express" Reporting Services?
> Thanks for any help.
> Trint
>|||On Jul 10, 9:37 am, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> Not sure about the version you are talking about. Is it the developers
> version? There are very few differences between versions. Most differences
> is not the report itself but other things like data driven subscriptions. A
> report is the same between versions.
> The main issue with SQL Server Express Reporting Services is not the report
> you designed but other limitations such as where the data resides. If you
> data is in Express Edition then you are fine. If you are wanting to report
> off of data on another SQL Server box then you will have problems.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "trint" <trinity.sm...@.gmail.com> wrote in message
> news:1184073842.297362.294370@.n2g2000hse.googlegroups.com...
>
> > Will my reports that I have created with "Microsoft SQL Server
> > Reporting Services Designers
> > Version" (This is the free RS designer) work on my new website with
> > SQL Server 2005 Express?
> > What I'm saying is, Can my website work with:
> > SQL Server 2005 Express Edition?
> > SQL Server "Express" Reporting Services?
> > Thanks for any help.
> > Trint- Hide quoted text -
> - Show quoted text -
I was just wondering if it is limited to local instead of being able
to work as the paid version across the internet.
Thanks,
Trint|||Feature differences:
http://www.microsoft.com/sql/technologies/reporting/rsfeatures.mspx
If you are trying to do this over the internet then you need custom
authentication which is not express. You need at least workgroup.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"trint" <trinity.smith@.gmail.com> wrote in message
news:1184077157.243178.67010@.g4g2000hsf.googlegroups.com...
> On Jul 10, 9:37 am, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
> wrote:
>> Not sure about the version you are talking about. Is it the developers
>> version? There are very few differences between versions. Most
>> differences
>> is not the report itself but other things like data driven subscriptions.
>> A
>> report is the same between versions.
>> The main issue with SQL Server Express Reporting Services is not the
>> report
>> you designed but other limitations such as where the data resides. If you
>> data is in Express Edition then you are fine. If you are wanting to
>> report
>> off of data on another SQL Server box then you will have problems.
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "trint" <trinity.sm...@.gmail.com> wrote in message
>> news:1184073842.297362.294370@.n2g2000hse.googlegroups.com...
>>
>> > Will my reports that I have created with "Microsoft SQL Server
>> > Reporting Services Designers
>> > Version" (This is the free RS designer) work on my new website with
>> > SQL Server 2005 Express?
>> > What I'm saying is, Can my website work with:
>> > SQL Server 2005 Express Edition?
>> > SQL Server "Express" Reporting Services?
>> > Thanks for any help.
>> > Trint- Hide quoted text -
>> - Show quoted text -
> I was just wondering if it is limited to local instead of being able
> to work as the paid version across the internet.
> Thanks,
> Trint
>

Wednesday, March 21, 2012

MS SQL Server 2000 & ADP Write Conflict Error


Im new to SQL and am having some difficulty.
I created a DB that has about 5 tables, all of which are related via the
client_id column.
I created a trigger which upon insert into my main table shoots the
client_id into the corresponding column in the other tables.
My front end is a MS ADP project. When I try to insert a new record
with "ALL" the fields in my MS Access ADP Form filled in I get a "Write
COnflict" Error. But when I try to insert a new record with "ONLY"
filling in the client_id filed the record is created without a proble?
Can anyone help me?
*** Sent via Developersdex http://www.examnotes.net ***Two possible things to check...
1. Do any of the other tables have columns that do not permit null?
If so, when the trigger tries to do the insert, you can't complete.
2. Is the ForeignKey in any of the tables you are writing to, .. identity.
If so, you are creating a duplicate.
"Anon" <anonymous@.devdex.com> wrote in message
news:OLHVYmlMGHA.3732@.TK2MSFTNGP10.phx.gbl...
>
> Im new to SQL and am having some difficulty.
> I created a DB that has about 5 tables, all of which are related via the
> client_id column.
> I created a trigger which upon insert into my main table shoots the
> client_id into the corresponding column in the other tables.
> My front end is a MS ADP project. When I try to insert a new record
> with "ALL" the fields in my MS Access ADP Form filled in I get a "Write
> COnflict" Error. But when I try to insert a new record with "ONLY"
> filling in the client_id filed the record is created without a proble?
> Can anyone help me?
>
> *** Sent via Developersdex http://www.examnotes.net ***|||1. I added a default value to the columns in the "other" tables that do
not allow nulls
2. The foreignkeys in all the other tables are the primary keys...if
that makes any sense (Is there a work around?)
Two possible things to check...
1. Do any of the other tables have columns that do not permit null?
If so, when the trigger tries to do the insert, you can't complete.
2. Is the ForeignKey in any of the tables you are writing to, ..
identity.
If so, you are creating a duplicate.
-RS
*** Sent via Developersdex http://www.examnotes.net ***|||1. I added a default value to the columns in the "other" tables that do
not allow nulls
2. The foreignkeys in all the other tables are the primary keys...if
that makes any sense (Is there a work around?)
Two possible things to check...
1. Do any of the other tables have columns that do not permit null?
If so, when the trigger tries to do the insert, you can't complete.
2. Is the ForeignKey in any of the tables you are writing to, ..
identity.
If so, you are creating a duplicate.
-RS
*** Sent via Developersdex http://www.examnotes.net ***sql

Monday, March 12, 2012

ms sql mdf database file attached vs created on sql server

Hi all

I have a question concerning sql database mdf files. In the old days I would user a ms access database. This file would be stored with the actual web files and would utilise a dsn connection.

I have noted when designing with vwd 2005 express it allows you to use 2 methods of creating a mdf database. You can either create it as an attachment mdf or you can create it directly using sql manager.

My question is, if you create the mdf database as an attachement file can you store it in the same manner as if you where using a ms access database, meaning can you store it with the web site's files so it uses the file storage allocated size and then create a connection similar to a dsn (but for sql) to the isp's sql engine or does it have to be uploaded to the isp' s sql server.

The reason for this question is some of my customers do not want to pay the extra cost to have an sql allocation, however I do not want to go back to using old asp methods to create advanced sites as I prefer using stored procedures.

Any help will be appreciated

Hi,

you can attach your .mdf file (SQL Server Express) to a database (Attaching a .mdf file when you don't have the .ldf file available). However I think the hosting company will charge your customers for attaching it. To my knowledge you don't have a replacement available like DSN.

Grz, Kris.

|||

Hi there,

My first website I did using Visual Studio I used an sql express database. Most hosting companys only use SQL server so you'll have to do some changes to your express database to get it hosted. So it doesnt really matter which way you design your database.

The hosting company will usually place your database on a separate secure server where you'll be able to access through SQL Server Manager once you have a static IP address. I'm not sure which hosting company you use but I live in Ireland and the best company here for windows hosting iswww.blacknight.ie

I use the standard windows hosting which allows you have up to 16 websites and 16 SQL server databases. An excellent company.

I recommend if you are going to use this a lot, upgrade your package to Visual Studio pro and this includes SQL Server Developer edition which allows you to create a SQL Server 2005 database which makes it easier when you go to publish your application.

Hope this is some use to you.

Anthony

|||

Hi Kris

So what you are saying is you can attach a database to an sql server without having to import it directly. Which means the database can run externally from the sql server. My hosting company I think offers it for free if you are attaching and they have a control panel which makes it user friendly to do this by yourself. I will contact them again to verify. www.sahost.co.za

|||

Hi,

about 1,5 years ago I tried out a free hosting for ASP.NET 2.0 where you could upload a .mdf file to and in their admin pages they provided such an attach procedure. Unfortunately I don't remember their name.

Grz, Kris.

MS SQL Linked Server Issue

Hi All,
I am have created a linked server in MS SQL 2000 to Sage Line 50v12 using the ODBC drivers in sage.I am able to view all the tables once I clicked on the link server link in the SQL enterprise manager. However when I run the below query I get only one records instead of 28.
SELECT * FROM OPENQUERY(SageL50, 'SELECT * from Sales_Ledger')
I am running SQL 2000 server with SP4
From the SQL online documentation I got to know that OPENQUERY returns only a single record. Is there any other function/command that will enable me to get all the records from a table from a linked server?
Can you let me know I am missing here?
Thanks and Regards,
Saurabh
Hi,
Any updates on the below query.
Thanks and Regards,
Saurabh
"news" <news@.microsoft.com> wrote in message news:%23b2csSXbIHA.484@.TK2MSFTNGP06.phx.gbl...
Hi All,
I am have created a linked server in MS SQL 2000 to Sage Line 50v12 using the ODBC drivers in sage.I am able to view all the tables once I clicked on the link server link in the SQL enterprise manager. However when I run the below query I get only one records instead of 28.
SELECT * FROM OPENQUERY(SageL50, 'SELECT * from Sales_Ledger')
I am running SQL 2000 server with SP4
From the SQL online documentation I got to know that OPENQUERY returns only a single record. Is there any other function/command that will enable me to get all the records from a table from a linked server?
Can you let me know I am missing here?
Thanks and Regards,
Saurabh
|||Did you try:
SELECT * FROM SageL50.<database>.<owner/schema>.Sales_Ledger
Replace <database> with the database that contains the table you want,
and the <owner/schema> with the owner of the table - generally dbo.
Example:
SELECT * FROM SageL50.db1.dbo.SalesLedger;
Jeff
news wrote:
> Hi,
> Any updates on the below query.
> Thanks and Regards,
> Saurabh
>
> "news" <news@.microsoft.com <mailto:news@.microsoft.com>> wrote in
> message news:%23b2csSXbIHA.484@.TK2MSFTNGP06.phx.gbl...
> Hi All,
> I am have created a linked server in MS SQL 2000 to Sage Line
> 50v12 using the ODBC drivers in sage.I am able to view all the
> tables once I clicked on the link server link in the SQL
> enterprise manager. However when I run the below query I get only
> one records instead of 28.
> SELECT * FROM OPENQUERY(SageL50, 'SELECT * from Sales_Ledger')
> I am running SQL 2000 server with SP4
> From the SQL online documentation I got to know that OPENQUERY
> returns only a single record. Is there any other function/command
> that will enable me to get all the records from a table from a
> linked server?
> Can you let me know I am missing here?
> Thanks and Regards,
> Saurabh
>

ms sql dts package

I created a DTS package, which has a vbscript file to create a new directory, when i run it directly from the command line “DOS” C:\>dtsrun /Sxxxxxxxx /u!xxxx /pxxxxxx /NZOOT_NDM_COPY_and_ZIP_SCORECARD

, I get:
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSActiveScriptTask_3
DTSRun OnFinish: DTSStep_DTSActiveScriptTask_3
DTSRun OnStart: DTSStep_DTSActiveScriptTask_1
DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1
DTSRun OnStart: DTSStep_DTSActiveScriptTask_2
DTSRun OnError: DTSStep_DTSActiveScriptTask_2, Error = -2147220482 (800403FE)
Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: Path not found
Error on Line 12
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 4500
Error Detail Records:
Error: -2147220482 (800403FE); Provider Error: 0 (0)
Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: Path not found
Error on Line 12
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 4500
DTSRun OnFinish: DTSStep_DTSActiveScriptTask_2
Error: -2147220440 (80040428); Provider Error: 0 (0)
Error string: Package failed because Step 'DTSStep_DTSActiveScriptTask_2' failed.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 700

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************
Function Main()
Dim fso,f1,f8,s,fldr,drv,fc,f
Set fso = CreateObject("Scripting.FileSystemObject")
f8 = DTSGlobalVariables("DATA_PATH").Value
' CREATE TODAYS FOLDER
if fso.FolderExists(f8&"\ZOOT_"&FormatDateTime(now,VBSHORTDATE)) then = LINE 12
'msgbox "directory Exists"
else
fso.CreateFolder (f8&"\ZOOT_"&FormatDateTime(now,VBSHORTDATE))
end if
' LOOP Through Files
'Change to a variable
Set f = fso.GetFolder(f8)
Set fc = f.Files
For Each f1 in fc
if cdate(left(f1.DateLastModified,10)) = cdate(datevalue(NOW)) then
f1.move (f8& "\ZOOT_"&FormatDateTime(now,VBSHORTDATE) &"\"&f1.name)
end if
' msgbox f1.name
Next
Main = DTSTaskExecResult_Success
End FunctionPlease verify the following:

Have you created a DTS from you EM Client or directly on the server ?

If this is the scenario then it gives you error. Instead of specifying the path like "c:\foldername\" try to give the UNC e.g \\servername\foldername"

May be it will help you

Thanks|||And ensure login used to execute the package has required privilege to complete the task or if you've scheduled same for the SQLAgent service account.

Friday, March 9, 2012

MS Sql Database

Hi
I have access to a MS Sql database from my webhost.
I have used MS Acces in the past and created the tables locally then uploaded the MS Access DB.
How & what do I use to connect to the MS SQL DB on my web host and how do I create tables within the DB?
I'm very new to using and trying to connect to MS Sql DB.
Thanks for any help in advance.
Cheers
kefi2927

Hi,

You would either require a SQL Client installation to connect to the Server where SQL Server exists to create Database/Tables etc.,

Else, you would require Remote Desktop Access to logon to the Server and work directly over there.

Thanks.

|||Hi
Thanks for the reply.
What utility would I use for a Remote Desktop Access.
Cheers|||Hi,
Remote Desktop Access is built-in functionality from Windows XP Professional (not sure about the Home Edition).
From START- RUN - Type "mstsc" and give ENTER. You will get the dialog for entering the IP address of the machine.
If Remote Desktop Access is enabled to the server and you are connected to the Internet, you can logon to that machine from your machine.
If you are running older versions or require Remote Desktop Client software, you can check and download fromhttp://www.microsoft.com/windowsxp/downloads/tools/rdclientdl.mspx
Thanks.