Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Friday, March 30, 2012

How to insert record to SQL server which is on the other machine from client computer?

I want to write simple sql database project that that works in the network. and i need to insert record from a client to a server that is on the other machine.

This is a pretty broad question. I suggest you do some additional research online or via any one of a number of excellent books, articles or whitepapers.

This will require that you (at least)

Install and configure the SQL Server on the remote system.

Monday, March 26, 2012

How to input and output simultaneously in SQL 2005 Express?

I want to process data of an old VS6 project in VisualStudio2005.
First part is done. With SQL Management Studio I created the database file 'dbTest4' and attached it to SQL 2005 Express server (.\SQLEXPRESS).
Then I recoded the VS6_C++ project feeding its data into the database file using the ConnectionString:
"Provider='sqloledb';Data Source='.';Initial Catalog='dbTest4';Integrated Security='SSPI')"
Until here its working fine.

Assecond part I want to catch these data with VisualStudio2005 for processing there.
In VisualStudio 2005 I created a Windows Application as new project added the database file 'dbTest4' as data source, waited two minutes till VisualStudio2005 had created the DataGridTools bound to the tabbles of my database file and dropped a grid tool on to the surface of the new Form.
Great, within 5 minutes I had created a working database solution without writing a single line of code and it worked well. Starting the new build exe as standlolone it showed the data of my database file in a nice grid view.
But it worked as standolone only. When I tried to combine both parts one part was blockedalways producing error messages as ' ..error 32 (The process cannot access the file because it is being used by another process.) while attempting to open the file '...\dbTest4'.

Does anybody know
how to get this input/output combination running
or is ist impossible to reach my target with SQL 2005 Express?

After reading through Roger Wolters November 2005 article SQL Server 2005 Express Edition User Instances and some hours of testing I came to the conclusion:
When using Visual Studio not exclusively but simultaneously with other clients as SQLcmd, SQL Managent Studio or what else, as shown in my screenshot 325 you should consider to
set 'User Instance=False'
if you are struck by connection problems.
For details you are welcome to visit my sreenshot folder. By clicking the numbered screenshots, enlarging them and using your browsers back button you can follow a detailed installation and see why, where and how to set 'User Instance=False'.
Martin

Friday, March 23, 2012

How to Increase maximum row size

Hi,
I have an database migration project wherein I need to migrate data from
FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and there
are more than 300 fields in one table. Now when I try to create the same
table structure in SQL, I get the error saying it has reached the maximum ro
w
size of 8060 bytes.
Can anyone let me know is there a way to increase the row size limit. If
yes, then how? Also it would be great if you can let me know whether it is a
good suggestion to increase the row size limit.
Regards,
Sudhakara.T.P.Hello,
In SQL 2005 it is possible and older version its a limitation. See the below
article.
http://searchsqlserver.techtarget.c...1149592,00.html
Thanks
Hari
"Sudhakara.T.P." <SudhakaraTP@.discussions.microsoft.com> wrote in message
news:1B5C4FB3-DB61-4E30-A3F6-8EE6113C623B@.microsoft.com...
> Hi,
> I have an database migration project wherein I need to migrate data from
> FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and
> there
> are more than 300 fields in one table. Now when I try to create the same
> table structure in SQL, I get the error saying it has reached the maximum
> row
> size of 8060 bytes.
> Can anyone let me know is there a way to increase the row size limit. If
> yes, then how? Also it would be great if you can let me know whether it is
> a
> good suggestion to increase the row size limit.
> Regards,
> Sudhakara.T.P.|||"Sudhakara.T.P." <SudhakaraTP@.discussions.microsoft.com> wrote in message
news:1B5C4FB3-DB61-4E30-A3F6-8EE6113C623B@.microsoft.com...
> Hi,
> I have an database migration project wherein I need to migrate data from
> FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and
> there
> are more than 300 fields in one table. Now when I try to create the same
> table structure in SQL, I get the error saying it has reached the maximum
> row
> size of 8060 bytes.
> Can anyone let me know is there a way to increase the row size limit. If
> yes, then how? Also it would be great if you can let me know whether it is
> a
> good suggestion to increase the row size limit.
There is no way to increase this limit. Given that your table has 300
columns, perhaps now is a good time to revisit the database design. It is
likely that this table/database is not properly normalized. At a minimum,
you will need to split the table to overcome the limit.

How to Increase maximum row size

Hi,
I have an database migration project wherein I need to migrate data from
FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and there
are more than 300 fields in one table. Now when I try to create the same
table structure in SQL, I get the error saying it has reached the maximum row
size of 8060 bytes.
Can anyone let me know is there a way to increase the row size limit. If
yes, then how? Also it would be great if you can let me know whether it is a
good suggestion to increase the row size limit.
Regards,
Sudhakara.T.P.Hello,
In SQL 2005 it is possible and older version its a limitation. See the below
article.
http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1149592,00.html
Thanks
Hari
"Sudhakara.T.P." <SudhakaraTP@.discussions.microsoft.com> wrote in message
news:1B5C4FB3-DB61-4E30-A3F6-8EE6113C623B@.microsoft.com...
> Hi,
> I have an database migration project wherein I need to migrate data from
> FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and
> there
> are more than 300 fields in one table. Now when I try to create the same
> table structure in SQL, I get the error saying it has reached the maximum
> row
> size of 8060 bytes.
> Can anyone let me know is there a way to increase the row size limit. If
> yes, then how? Also it would be great if you can let me know whether it is
> a
> good suggestion to increase the row size limit.
> Regards,
> Sudhakara.T.P.|||"Sudhakara.T.P." <SudhakaraTP@.discussions.microsoft.com> wrote in message
news:1B5C4FB3-DB61-4E30-A3F6-8EE6113C623B@.microsoft.com...
> Hi,
> I have an database migration project wherein I need to migrate data from
> FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and
> there
> are more than 300 fields in one table. Now when I try to create the same
> table structure in SQL, I get the error saying it has reached the maximum
> row
> size of 8060 bytes.
> Can anyone let me know is there a way to increase the row size limit. If
> yes, then how? Also it would be great if you can let me know whether it is
> a
> good suggestion to increase the row size limit.
There is no way to increase this limit. Given that your table has 300
columns, perhaps now is a good time to revisit the database design. It is
likely that this table/database is not properly normalized. At a minimum,
you will need to split the table to overcome the limit.

How to Increase maximum row size

Hi,
I have an database migration project wherein I need to migrate data from
FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and there
are more than 300 fields in one table. Now when I try to create the same
table structure in SQL, I get the error saying it has reached the maximum row
size of 8060 bytes.
Can anyone let me know is there a way to increase the row size limit. If
yes, then how? Also it would be great if you can let me know whether it is a
good suggestion to increase the row size limit.
Regards,
Sudhakara.T.P.
Hello,
In SQL 2005 it is possible and older version its a limitation. See the below
article.
http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1149592,00.html
Thanks
Hari
"Sudhakara.T.P." <SudhakaraTP@.discussions.microsoft.com> wrote in message
news:1B5C4FB3-DB61-4E30-A3F6-8EE6113C623B@.microsoft.com...
> Hi,
> I have an database migration project wherein I need to migrate data from
> FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and
> there
> are more than 300 fields in one table. Now when I try to create the same
> table structure in SQL, I get the error saying it has reached the maximum
> row
> size of 8060 bytes.
> Can anyone let me know is there a way to increase the row size limit. If
> yes, then how? Also it would be great if you can let me know whether it is
> a
> good suggestion to increase the row size limit.
> Regards,
> Sudhakara.T.P.
|||"Sudhakara.T.P." <SudhakaraTP@.discussions.microsoft.com> wrote in message
news:1B5C4FB3-DB61-4E30-A3F6-8EE6113C623B@.microsoft.com...
> Hi,
> I have an database migration project wherein I need to migrate data from
> FileMaker Pro to SQL. The FileMaker Pro stores files as flat files and
> there
> are more than 300 fields in one table. Now when I try to create the same
> table structure in SQL, I get the error saying it has reached the maximum
> row
> size of 8060 bytes.
> Can anyone let me know is there a way to increase the row size limit. If
> yes, then how? Also it would be great if you can let me know whether it is
> a
> good suggestion to increase the row size limit.
There is no way to increase this limit. Given that your table has 300
columns, perhaps now is a good time to revisit the database design. It is
likely that this table/database is not properly normalized. At a minimum,
you will need to split the table to overcome the limit.

Wednesday, March 21, 2012

How to include SQL Express in Installation Package and change some option?

Hi, there,
I'm working on a windows application project which uses SQL Express as
database.
I found I can include SQL Server 2005 Express Edition in the installation
project as Prerequests,
that's cool.
But I need do more things, I want to change the "Authentication Mode" from
"Windows Authentication mode"
(which is default) to "SQL Server Authentication mode" and assign a "default
password" to user "sa", and
I want to attach a database file which will be include on the installation
disc.
So what shall I do? Write some script in the installation project?
Does SQL Express provide any program interface to do that?
It seems there is no help content for this in the MSDN and I did some search
job and got nothing.
Help needed. Thank you.
Best wishes!
I could write a chapter on this but here it is in a nutshell.
You need to use the Unattended Install tenplate.ini file along with the
LOGName and Datasource.xml.
Here is a fantastic article.
http://www.devx.com/dbzone/Article/31648
thanks,
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"Philip.Arbin" <philip@.newsgroups.nospam> wrote in message
news:OvWXUO85GHA.508@.TK2MSFTNGP06.phx.gbl...
> Hi, there,
> I'm working on a windows application project which uses SQL Express as
> database.
> I found I can include SQL Server 2005 Express Edition in the installation
> project as Prerequests,
> that's cool.
> But I need do more things, I want to change the "Authentication Mode" from
> "Windows Authentication mode"
> (which is default) to "SQL Server Authentication mode" and assign a
> "default password" to user "sa", and
> I want to attach a database file which will be include on the installation
> disc.
> So what shall I do? Write some script in the installation project?
> Does SQL Express provide any program interface to do that?
> It seems there is no help content for this in the MSDN and I did some
> search job and got nothing.
> Help needed. Thank you.
> Best wishes!
>
|||Hmm.....
Thank you.
I have read it, and there is really something interesting.
But there is another thing I can not do with this article.
I want to open Name Pipe and TCP connection of the SQL EXPRESS during the
setup,
but there is no such setting in the template.ini file.
Any other help?
"Warren Brunk" <wbrunk@.techintsolutions.com> wrote in message
news:uFytSE%235GHA.3592@.TK2MSFTNGP05.phx.gbl...
>I could write a chapter on this but here it is in a nutshell.
> You need to use the Unattended Install tenplate.ini file along with the
> LOGName and Datasource.xml.
> Here is a fantastic article.
> http://www.devx.com/dbzone/Article/31648
>
> thanks,
> --
> /*
> Warren Brunk - MCITP - SQL 2005, MCDBA
> www.techintsolutions.com
> */
>
> "Philip.Arbin" <philip@.newsgroups.nospam> wrote in message
> news:OvWXUO85GHA.508@.TK2MSFTNGP06.phx.gbl...
>
|||Philip,
All you need to do is edit the package.xml file - you can specify the
command line parameters you want to use for installing SQLExpress. The file
is located in
C:\Program Files\Microsoft Visual Studio
8\SDK\v2.0\BootStrapper\Packages\SqlExpress\en
The default setup is
Arguments='-q /norebootchk /qn reboot=ReallySuppress addlocal=all
instancename=SQLEXPRESS SQLAUTOSTART=1'
You might want to change it to something like
Arguments='-q /norebootchk /qn reboot=ReallySuppress addlocal=all
instancename=SQLEXPRESS SQLAUTOSTART=1 SECURITYMODE=SQL SAPWD=yoursapw
DISABLENETWORKPROTOCOLS=0'
See the readme file for SQLExpress for the command line options. That will
get SQLExpress installed the way you want it. Use a custom action dll to
install your db, attach it, set up the user accounts you want, etc.
Russ Stevens
|||Ah haaaaaa!
This is right the solution I am looking for!
Powerful!
Thank you very much!
"Russell Stevens" <rustyprogrammer@.online.nospam> wrote in message
news:OkMqQxy8GHA.5092@.TK2MSFTNGP04.phx.gbl...
> Philip,
> All you need to do is edit the package.xml file - you can specify the
> command line parameters you want to use for installing SQLExpress. The
> file is located in
> C:\Program Files\Microsoft Visual Studio
> 8\SDK\v2.0\BootStrapper\Packages\SqlExpress\en
> The default setup is
> Arguments='-q /norebootchk /qn reboot=ReallySuppress addlocal=all
> instancename=SQLEXPRESS SQLAUTOSTART=1'
> You might want to change it to something like
> Arguments='-q /norebootchk /qn reboot=ReallySuppress addlocal=all
> instancename=SQLEXPRESS SQLAUTOSTART=1 SECURITYMODE=SQL SAPWD=yoursapw
> DISABLENETWORKPROTOCOLS=0'
> See the readme file for SQLExpress for the command line options. That will
> get SQLExpress installed the way you want it. Use a custom action dll to
> install your db, attach it, set up the user accounts you want, etc.
> Russ Stevens
>

How to include data from 2 unlinked tables

I am using VB6 and CR10 & SQL Server 7
I am working on an inventory project nw.. I'm new to crystal reports..

For the report i need to pick data from 2 tables(Sales_Details, Purchase_Details)
There is no link between these 2 tables (except a similarity that both have got a date field)

TABLE 1
Sale_Date... SalesQty
01/01/07...... 50
01/03/07...... 24
01/04/07...... 10

TABLE 2
Purch_Date... Purchase Qty
01/01/07 ....... 100
01/06/07 ....... 100

I need to take a report which shows the movement of a particular Item based on date range
It should look like this

------x----x----x
Date ......... Sales.......Purchase
------x----x----x

01/01/07 ........ 50 ........ 100
01/03/07 ........ 24 ........ 0
01/04/07 ........ 10 ........ 0
01/06/07 ........ 0 ........ 100
--------------
I tried inner and outer joins to links these tables, but all in vein( data is getting repeated then), tried with groups also..no use

Pleeeaaase... help me to do this...
This may be a simple issue for most of you...
But i am a beginner.. i need your valuable help..
Plzzzzz...Just to make sure, but there are no PKeys in either one of your tables?|||You say you need to report by item, so surely there must be some sort of item code in both tables otherwise how do you know what item you're buying / selling?|||Ofcourse item code is there... For sake of simplicity i dint mention that.

Actually both the purchase and sales table has the fileds- Date, Itemcode, Quantity

Sales Table

Date...... ItemCode........Qnty
------------
01/01/07 ..A001............50
01/03/07...A001............24
01/04/07...A001............10

Purchase Table
Date...... ItemCode........Qnty
------------
01/01/07...A001............100
01/06/07...A001............100

and i need a report (like the one mentioned above)based on the movement of Item -A001 ..

Please...........|||First:
You wrote:

There is no link between these 2 tables (except a similarity that both have got a date field)
This is the reason for the questions now I assume itemcode is your link.
Next you will group by date and itemcode if you want, now for grouping by date go to options and choose section to be printed by day.
Then you will need to create formulas that will check to see the quantity of sales and purchases.

Something like:

If {Sales.quantity} > 0
Then {Sales.quantity}
Else 0

Hope that helps,
GJ

Monday, March 19, 2012

How to import the data from oracle to SQL Server?

Hello friends,

I am working for a project. At my college I used to work with oracle. Now as requirement changes I have to change my database to SQL Server.

Is there any simple way one can suggest me?

Wow, I believe that you may have posted in the wrong forum.

This should have been posted in the "Oracle to SQL Server in I step...Data, DDL and Procedures" forum.

|||

Ryan.Kelley wrote:

Wow, I believe that you may have posted in the wrong forum.

This should have been posted in the "Oracle to SQL Server in I step...Data, DDL and Procedures" forum.

Is this meant to be helpful?

This may be of value (and other Google sites): http://www.sql-server-performance.com/np_migrating_from_oracle_to_sql_server.asp

Friday, March 9, 2012

How to import cube definition from SSAS 2000 to SSAS 2005

Hi.
I have a SSAS project CAB-file created in SSAS2000 and would like to import/convert it to a SSAS2005 project but I can't find any way to do this... Does anybody know how this is done? Any suggestions would be greatly appreciated!

Regards
Kjetil

AS2005 won't read the backup files produced in AS2000, but AS2005 comes with MigrationWizard.exe that can be used. You will need to:
- have AS2000 running and containing the database you want to migrate
- run MigrationWizard.exe, specify the source AS2000 and then you can decide to migrate directly to an AS2005 or to just generate the migration script (and XML/A script that you can later run on AS2005 with SQL Management Studio)
- you will need to reprocess the database on AS2005

Adrian.

|||Hello Adrian,

I tried your solution but I still have a problem.

In my case the MSAS 2000 (with cubes) is on a separate server. I can connect and start the wizard but when the wizard is checking the data source it fails.

CONFIG:
Server #1: MS SQL Server 2000 (SP4) + MS AS 2000 (SP4)

Server #2: MS SQL Server 2005 + MS AS 2005

I have a local account on Server #1 and a local account on Server #2. Both same name + password.

The DTS-wizard is working fine, but the MSAS migrationwizard not.

Any ideas?

Thanks in advance for any help.
Marco.|||Hi,
The error occurs in the validation page (where there is a tree with the AS2000 objects) or on the next page (migration page - where the script is being sent to AS2005) ?
Can you please post the error ? Or the log if the error occured in the validation page (there are some buttons under the tree, one can be used to get the log).

Thank you,
Adrian Dumitrascu.|||Hello Adrian,

Thanks for your reply.

My first server (SQL 2000), SERVER#1 is on domain AAA.DOMAIN.COM
My second server (SQL 2005), SERVER#2 is on domain BBB.DOMAIN.COM

The message I get is: Source server: The following system error occurred: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Any suggestions?

Why not just easy use the .CAB file?

Thanks in advance,
Marco.|||Thank you!
Sorry for the delayed reply but I'be been rather busy lately.
I am starting on this project next week and will try out your suggestions.

Best regards
Kjetil Smile

How to import cube definition from SSAS 2000 to SSAS 2005

Hi.
I have a SSAS project CAB-file created in SSAS2000 and would like to import/convert it to a SSAS2005 project but I can't find any way to do this... Does anybody know how this is done? Any suggestions would be greatly appreciated!

Regards
Kjetil

AS2005 won't read the backup files produced in AS2000, but AS2005 comes with MigrationWizard.exe that can be used. You will need to:
- have AS2000 running and containing the database you want to migrate
- run MigrationWizard.exe, specify the source AS2000 and then you can decide to migrate directly to an AS2005 or to just generate the migration script (and XML/A script that you can later run on AS2005 with SQL Management Studio)
- you will need to reprocess the database on AS2005

Adrian.

|||Hello Adrian,

I tried your solution but I still have a problem.

In my case the MSAS 2000 (with cubes) is on a separate server. I can connect and start the wizard but when the wizard is checking the data source it fails.

CONFIG:
Server #1: MS SQL Server 2000 (SP4) + MS AS 2000 (SP4)

Server #2: MS SQL Server 2005 + MS AS 2005

I have a local account on Server #1 and a local account on Server #2. Both same name + password.

The DTS-wizard is working fine, but the MSAS migrationwizard not.

Any ideas?

Thanks in advance for any help.
Marco.|||Hi,
The error occurs in the validation page (where there is a tree with the AS2000 objects) or on the next page (migration page - where the script is being sent to AS2005) ?
Can you please post the error ? Or the log if the error occured in the validation page (there are some buttons under the tree, one can be used to get the log).

Thank you,
Adrian Dumitrascu.|||Hello Adrian,

Thanks for your reply.

My first server (SQL 2000), SERVER#1 is on domain AAA.DOMAIN.COM
My second server (SQL 2005), SERVER#2 is on domain BBB.DOMAIN.COM

The message I get is: Source server: The following system error occurred: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Any suggestions?

Why not just easy use the .CAB file?

Thanks in advance,
Marco.|||Thank you!
Sorry for the delayed reply but I'be been rather busy lately.
I am starting on this project next week and will try out your suggestions.

Best regards
Kjetil Smile

how to impliment "array" in stored procedure?

i doing an online shop project which have an shoppingcart and it stored database.
and i have the situation like this.
the products have properties such as size, color . and customerscan buy a product with particular size or color. and i havethe shopping cart table structure and data like following
Id(primary key) CartId productId size color quantity
1 1 1 S red 10
2 1 1 S black 2
3 1 1 S blue 3
4 1 1 M red 5
5 1 1 L blue 2
all the data above is i image the customer may inputed. And myproblem is how to use an stored procedure to updata above record when a customer buy the same product which is one of the product fromabove(have same productId, size, color)
and i try to use the following code but it didn't work
<code>
create procedure shoppingcart_add_item
( @.cartId int,
@.productId int,
@.size nvarchar(20),
@.color nvarchar(20),
@.quantity int
)
AS
DECLARE @.countproduct
DECLARE @.oldsize
DECLARE @.oldcolor
select @.countproduct=count(productId) FROM shoppingcart WHERE productId=@.productId AND cartId=@.cartId
select @.oldsize=size,@.oldcolor=color FROM shoppingcart WHERE productId=@.productId
IF @.CountItems > 0 and @.oldsize = @.size and @.oldcolor = @.color
UPDATE
ShoppingCart
SET
Quantity = (@.Quantity + ShoppingCart.Quantity)
WHERE
ProductId = @.ProductId
AND
CartId = @.CartId
ELSE /* New entry for this Cart. Add a new record */
INSERT INTO ShoppingCart
(
CartId,
ProductId,
Quantity,
color,
size
)
VALUES
(
@.CartId,
@.ProductId,
@.Quantity,
@.size,
@.color
)
</CODE>
and the result from this stored procedure is not what i want, what itry to say is can i stored all the size and color in @.oldsize and@.oldcolor array. then loop through the array to get the one iwant??
somebody get any idea? or don't know what i am talking about?
sorry i asked a very stupid quesation, i just think too much, actually the solution is increditable simple, it just need alittle bit SQL can slove this(simple get the Id and update the newrecord depend on this Id)
i don't know why i am so stupid to make things complicated.