Showing posts with label visual. Show all posts
Showing posts with label visual. Show all posts

Monday, March 19, 2012

doubt with sql and an store procedure

I'm working with the stored procedure editor of the Visual Web Developer, and I have this:
ALTER PROCEDURE dbo.ClasificacionSelectTodas
(
@.visibilidad bit = 1
)
AS
SET NOCOUNT ON
SELECT Clas_Id, Clas_Madre, Clas_Titulo, Clas_Descripcion, Clas_Prioridad, Clas_Visibilidad
FROM Clasificacion
WHERE (Clas_Visibilidad = @.visibilidad)
As you see, if I don't set any value to "@.visibilidad" it returns me the registries where visibilidad = 1
But what I want is that if I don't set any value to visibilidad, itturns to me all the registries. I was trying giving a default value tovisibilidad like "*" o "?", but it gives me an error.
Any idea?
ThanksStick out tongue [:P]
ALTER PROCEDURE dbo.ClasificacionSelectTodas
(
@.visibilidad bit = null
)
AS
SET NOCOUNT ON
SELECT Clas_Id, Clas_Madre, Clas_Titulo, Clas_Descripcion, Clas_Prioridad, Clas_Visibilidad
FROM Clasificacion
WHERE (Clas_Visibilidad = IsNull(@.visibilidad,Clas_Visibilidad))
This will compare Clas_Cisibilidad to the variable passed in (if not null) or with itself (which will always be true).|||Thanks douglas, it works greatStick out tongue [:P]
Congratulations for your book!
|||Glad it helped.
Also, I am actually working on a new book, tentatively titledStreamlined Web Forms Development. Should be out by ASP.NET 2.0 release, and will make a great stocking suffer<g>.|||I'm sure it will be highly interesting, I'll wait for it ;)

doubt in crystal report(help needed Urgently)

hai

I have one doubt in crystal report.I am using crystal report 7 version.I added a databse to report and i connected that report with visual basic and my report is working.Except that i cant refresh my report at runtime and so it displays the same values repeatedly.

I cant use crystal report 8 or 9 or 10.

Help needed urgently

Bye
Ramyafrom file menu of crystal report , uncheck the option of 'Save Data with Report', then save the file and try .|||hai

i have one doubt i am using crystal report from visual basic and not directly from crstal report.

That is i added report at project itself and so where to change that option

Bye
Ramya

Doubt in " HOW TO: Query and Display Excel Data by Using ASP.NET, ADO.NET, and Visual C# .

Hi,

In my application, I need to copy data from an Excel file into a SQL
table. The article related to this can be found at

http://support.microsoft.com/defaul...Ben-us%3B306572

Using this,I am first extracting data from given excel file into a
temporary DataTable. After making some operations on that DataTable
(like splitting one column into two), I am saving the data into actual
table in SQL Server.

My doubt is that, in the above given link, there are few steps needed
to do on the excel file... eg.
--> Highlight the rows and columns where the data resides.
--> On the Insert menu, point to Name, and then click Define.
--> In the Names in workbook text box, type myRange1, and then click
OK.

I don't want my client to do thsese operations everytime he changes
contents in that excel file, as this excel file changes almost daily.
The extracting of data from excel file is done after clicking UPDATE
button on webpage. The person saving data into Excel file is differnet
from the one who updates it into SQL.

Is there any other way where we can directly copy data from excel file
into DataTable without doing the above three steps?

I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
language for this web-based project.

Any advice would be greatly appreciated. Thanks in advance.

Regards,
RK."RK" <rakish123@.yahoo.com> wrote in message
news:22626a3.0404020930.7d9bdd7e@.posting.google.co m...
> Hi,
> In my application, I need to copy data from an Excel file into a SQL
> table. The article related to this can be found at
> http://support.microsoft.com/defaul...Ben-us%3B306572
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?
> I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
> language for this web-based project.
> Any advice would be greatly appreciated. Thanks in advance.
> Regards,
> RK.

The article doesn't mention SQL Server anywhere, and it sounds like your
problem is how to automate something in Excel, so I guess you'll get a
better answer in an Excel or C# newsgroup.

Simon|||RK (rakish123@.yahoo.com) writes:
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?

Of course there is.

I have not tried to get data from Excel with SELECT statements, but
would be surprised if "SELECT * FROM Sheet1" would work. I've mainly
use the OLE interface to get data from Excel in Perl. While I understand
that you don't want users to have to highlight things, I fail to see
but that you need to have some pre-defined structure that the Excel
file must have, or else you will have no idea of what you are importing.

But while you said SQL Server twice in your posting (look again Simon! :-),
your question seems more to be related to Excel, so you should find a
group about Excel.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||You might look at the capabilities of SQL Server DTS Packages. They can
read from Excel spreadsheets. However, your datasheet would have to be
massaged enough that the data was a fairly straightforward import.

I suppose if I were you, I'd use a combination of VBA code to hack up the
spreadsheet, save it to a convenient spreadsheet, then use SQL-DMO to
trigger a DTS package for the import.

Otherwise, you could just do a VBA module that would pass in the interesting
data directly over an ADO, OLEDB or ODBC connection. We've done something
like that, it wasn't terribly difficult.

"RK" <rakish123@.yahoo.com> wrote in message
news:22626a3.0404020930.7d9bdd7e@.posting.google.co m...
> Hi,
> In my application, I need to copy data from an Excel file into a SQL
> table. The article related to this can be found at
> http://support.microsoft.com/defaul...Ben-us%3B306572
> Using this,I am first extracting data from given excel file into a
> temporary DataTable. After making some operations on that DataTable
> (like splitting one column into two), I am saving the data into actual
> table in SQL Server.
> My doubt is that, in the above given link, there are few steps needed
> to do on the excel file... eg.
> --> Highlight the rows and columns where the data resides.
> --> On the Insert menu, point to Name, and then click Define.
> --> In the Names in workbook text box, type myRange1, and then click
> OK.
> I don't want my client to do thsese operations everytime he changes
> contents in that excel file, as this excel file changes almost daily.
> The extracting of data from excel file is done after clicking UPDATE
> button on webpage. The person saving data into Excel file is differnet
> from the one who updates it into SQL.
> Is there any other way where we can directly copy data from excel file
> into DataTable without doing the above three steps?
> I am using Visual Studio.NET 2003,SQL Server 2000 and C# as developing
> language for this web-based project.
> Any advice would be greatly appreciated. Thanks in advance.
> Regards,
> RK.|||Hi,

There are a few alternatives. I recommend you to use SQL*XL an addin I
wrote for Excel to do these things. There are some other alternatives
which I will mention.

1. SQL*XL - addin for Excel to access your databases.
SQL*XL is an addin for Excel that allows you to access your database
directly from Excel. You can query data into Excel or you can pump
data from Excel into the database. SQL*XL focusses on making it easy
for the end user but it can also be used to make scripts as it is
fully compatible with Excel macro recording and VBA.

Have a look at SQL*XL at: www.oraxcel.com

2. Define your Excel workbook as a data source in ODBC
If you do this you can issue select statements against it. You can use
it in an openquery statement in SQL server or even make it a linked
server I suppose. Named ranges will appear as tables. Reserve row 1
for the column headers.
Problems with this technique: it is readonly, you may have problems
with accessing the workbook (in use)
The nice thing is that you can use it directly in SQL or DTS

3. You can write a little macro in Excel that dumps the file out in a
nominated format (CSV e.g) and a nominated directory. You could have
DTS to pickup the file and import it in your database table.

Hope this helps,

Gerrit-Jan Linker
Linker IT Consulting Limited
www.oraxcel.com
Author of SQL*XL

Doubt about SQL Server

I need an application to obtain the databases names from my SQL
Server, using Visual Basic 6.0.
Can somebody hel me?(aguzmanc@.gmail.com) writes:

Quote:

Originally Posted by

I need an application to obtain the databases names from my SQL
Server, using Visual Basic 6.0.
Can somebody hel me?


SELECT name FROM master..sysdatabases -- SQL 2000 or earlier
SELECT name FROM sys.databases -- SQL 2005.

Or what is you want help with?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Tuesday, February 14, 2012

Does Visual web developer Express edition works with Ms 2000 Database Service?

I have made my website using SQL Server Express edition. It is totally database driven and manypages use databases to display data. My problem is that after paying for webhosting fees my web host told me that they do not support SQL Server express edition. Instead they have support for MySQL and Ms Access. Except that there is this MS 2000 Database service for an additional cost. Any recommendations what I should do except changing the host? If I pay for MS 2000 Database servicem, will my website work? My user management(i.e ASPNETDB database) was created by Visual Web developer and I don't want to do user management myself. Any advice?

HI Gurus,

I am also facing the same problem, i developed asp.net 2.0 application with Sql Server 2005 Express edition, with the bundled user managment facility. After completion the project, my host told, they only support SqlServer 2000 version.

In my website every pages linked with the database (connection strings). I dont know what i need to do?

This is very urgent, can anyone help? (Include Mr. Rex lim)

Sankar

|||

Hi,

Actually you can import the aspnetdb database into your SQLServer2000 by aspnet_regsql tool, backup the database file, restore it on your server-side. In this way, you can use membership, profile with SQL Server2000 database.

More detail about the tool:http://msdn2.microsoft.com/en-us/library/ms229862(vs.80).aspx

Thanks.

Does Visual Studio 2005 come with SQL Server 2005 Standard?

All, does VS2005 come with SQL Server 2005 Standard? If not, what version
of SQL does it come with? How can I identify that version installed?
Thanks for your help.
VS includes SQL Server Express edition. SQL Server Developer Edition is
included with VS MSDN subscriptions as a separate install.
One method to identify the installed version is with the query:SELECT
@.@.VERSION.
Hope this helps.
Dan Guzman
SQL Server MVP
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:CA3B7A75-B0C5-4BC5-958B-6DA893C6D562@.microsoft.com...
> All, does VS2005 come with SQL Server 2005 Standard? If not, what
> version
> of SQL does it come with? How can I identify that version installed?
> Thanks for your help.
|||So, your telling me, if I have SQL Server 2005 Standard, there is no visual
Studio pro included, but if i have SQL 2005 Developer Edition, then VS Studio
Pro is?
"Dan Guzman" wrote:

> VS includes SQL Server Express edition. SQL Server Developer Edition is
> included with VS MSDN subscriptions as a separate install.
> One method to identify the installed version is with the query:SELECT
> @.@.VERSION.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Rob" <Rob@.discussions.microsoft.com> wrote in message
> news:CA3B7A75-B0C5-4BC5-958B-6DA893C6D562@.microsoft.com...
>
|||> So, your telling me, if I have SQL Server 2005 Standard, there is no
> visual
> Studio pro included, but if i have SQL 2005 Developer Edition, then VS
> Studio
> Pro is?
I understood that you original question was what SQL Server version(s) you
get with Visual Studio. However, you are now asking what version of Visual
Studio you get with SQL Server.
VS 2005 pro is not included with any SQL Server edition. A basic VS IDE is
included with SQL Server Standard, Enterprise and Developer that includes
support for only BI projects (SSIS, AS, etc.). If you already have VS
installed, support for those project types are added to your existing VS
installation so that you can use a single IDE for all project types.
Hope this helps.
Dan Guzman
SQL Server MVP
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:7904116A-6079-4EF7-A0AC-A48DEF8CB67D@.microsoft.com...[vbcol=seagreen]
> So, your telling me, if I have SQL Server 2005 Standard, there is no
> visual
> Studio pro included, but if i have SQL 2005 Developer Edition, then VS
> Studio
> Pro is?
> "Dan Guzman" wrote:

Does Visual Studio 2005 come with SQL Server 2005 Standard?

All, does VS2005 come with SQL Server 2005 Standard? If not, what version
of SQL does it come with? How can I identify that version installed?
Thanks for your help.VS includes SQL Server Express edition. SQL Server Developer Edition is
included with VS MSDN subscriptions as a separate install.
One method to identify the installed version is with the query:SELECT
@.@.VERSION.
Hope this helps.
Dan Guzman
SQL Server MVP
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:CA3B7A75-B0C5-4BC5-958B-6DA893C6D562@.microsoft.com...
> All, does VS2005 come with SQL Server 2005 Standard? If not, what
> version
> of SQL does it come with? How can I identify that version installed?
> Thanks for your help.|||So, your telling me, if I have SQL Server 2005 Standard, there is no visual
Studio pro included, but if i have SQL 2005 Developer Edition, then VS Studi
o
Pro is?
"Dan Guzman" wrote:

> VS includes SQL Server Express edition. SQL Server Developer Edition is
> included with VS MSDN subscriptions as a separate install.
> One method to identify the installed version is with the query:SELECT
> @.@.VERSION.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Rob" <Rob@.discussions.microsoft.com> wrote in message
> news:CA3B7A75-B0C5-4BC5-958B-6DA893C6D562@.microsoft.com...
>|||> So, your telling me, if I have SQL Server 2005 Standard, there is no
> visual
> Studio pro included, but if i have SQL 2005 Developer Edition, then VS
> Studio
> Pro is?
I understood that you original question was what SQL Server version(s) you
get with Visual Studio. However, you are now asking what version of Visual
Studio you get with SQL Server.
VS 2005 pro is not included with any SQL Server edition. A basic VS IDE is
included with SQL Server Standard, Enterprise and Developer that includes
support for only BI projects (SSIS, AS, etc.). If you already have VS
installed, support for those project types are added to your existing VS
installation so that you can use a single IDE for all project types.
Hope this helps.
Dan Guzman
SQL Server MVP
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:7904116A-6079-4EF7-A0AC-A48DEF8CB67D@.microsoft.com...[vbcol=seagreen]
> So, your telling me, if I have SQL Server 2005 Standard, there is no
> visual
> Studio pro included, but if i have SQL 2005 Developer Edition, then VS
> Studio
> Pro is?
> "Dan Guzman" wrote:
>

Does Visual Studio 2005 come with SQL Server 2005 Standard?

All, does VS2005 come with SQL Server 2005 Standard? If not, what version
of SQL does it come with? How can I identify that version installed?
Thanks for your help.VS includes SQL Server Express edition. SQL Server Developer Edition is
included with VS MSDN subscriptions as a separate install.
One method to identify the installed version is with the query:SELECT
@.@.VERSION.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:CA3B7A75-B0C5-4BC5-958B-6DA893C6D562@.microsoft.com...
> All, does VS2005 come with SQL Server 2005 Standard? If not, what
> version
> of SQL does it come with? How can I identify that version installed?
> Thanks for your help.|||So, your telling me, if I have SQL Server 2005 Standard, there is no visual
Studio pro included, but if i have SQL 2005 Developer Edition, then VS Studio
Pro is?
"Dan Guzman" wrote:
> VS includes SQL Server Express edition. SQL Server Developer Edition is
> included with VS MSDN subscriptions as a separate install.
> One method to identify the installed version is with the query:SELECT
> @.@.VERSION.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Rob" <Rob@.discussions.microsoft.com> wrote in message
> news:CA3B7A75-B0C5-4BC5-958B-6DA893C6D562@.microsoft.com...
> > All, does VS2005 come with SQL Server 2005 Standard? If not, what
> > version
> > of SQL does it come with? How can I identify that version installed?
> >
> > Thanks for your help.
>|||> So, your telling me, if I have SQL Server 2005 Standard, there is no
> visual
> Studio pro included, but if i have SQL 2005 Developer Edition, then VS
> Studio
> Pro is?
I understood that you original question was what SQL Server version(s) you
get with Visual Studio. However, you are now asking what version of Visual
Studio you get with SQL Server.
VS 2005 pro is not included with any SQL Server edition. A basic VS IDE is
included with SQL Server Standard, Enterprise and Developer that includes
support for only BI projects (SSIS, AS, etc.). If you already have VS
installed, support for those project types are added to your existing VS
installation so that you can use a single IDE for all project types.
Hope this helps.
Dan Guzman
SQL Server MVP
"Rob" <Rob@.discussions.microsoft.com> wrote in message
news:7904116A-6079-4EF7-A0AC-A48DEF8CB67D@.microsoft.com...
> So, your telling me, if I have SQL Server 2005 Standard, there is no
> visual
> Studio pro included, but if i have SQL 2005 Developer Edition, then VS
> Studio
> Pro is?
> "Dan Guzman" wrote:
>> VS includes SQL Server Express edition. SQL Server Developer Edition is
>> included with VS MSDN subscriptions as a separate install.
>> One method to identify the installed version is with the query:SELECT
>> @.@.VERSION.
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Rob" <Rob@.discussions.microsoft.com> wrote in message
>> news:CA3B7A75-B0C5-4BC5-958B-6DA893C6D562@.microsoft.com...
>> > All, does VS2005 come with SQL Server 2005 Standard? If not, what
>> > version
>> > of SQL does it come with? How can I identify that version installed?
>> >
>> > Thanks for your help.