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

Sunday, March 25, 2012

Data Source

I have a problem connecting Visual Studio 2005 to my DataBase file. I've downloaded northwind.mdf . Three weeks ago I installed SQL express and I used Visual Studio in the following manner: From server Explorer tab I choose Add connection.. , Change data source and I selected Microsoft SQL Server Database File (SqlClient), next I've selected my NORTHWND.MDF and when I pressed Test connection , it succeded. Recently, I've purchsed SQL server developer edition. The problem is when I follow the steps above I reveive:

An error has occurred while establishing a connection to the server, When connecting to SQL Server 2005, this failture may be caused by the fact that under the default SQL Server does not allow remote connections. ( provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

So , I've checked and changed remote connections to allow TCP/IP , but I receive the same error.

I've set up Visual Studio to SQL Server Instance Name : NAME , where NAME is the name assigned to my SQL Server. Worthless

The thing is it is working in another way : From server Explorer tab I choose Add connection.. , Change data source and I selected Microsoft SQL Server (SqlClient) , next I've selected server name to NAME , then Attach a database file . Test connection : succeded . This is because I do not have the northwind database attached directly in my SQL server ( and I do not want to ) .

Why with Developer edition I do not receive the same results ? Where is the mistake?

Thank you

Connecting to a database is a feature available only in SQL Server Express edition, but not in any other SQL Server version. This feature intention is to allow database applications development without the need to have a DBA who attaches the database files. For more information I would recommend to visit SQL Server 2005 Express Edition User Instances (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/sqlexpuserinst.asp).

If you want to use SQL Server developer edition, I would recommend attaching the database to SQL Server. For more information on this topic you can visit the following link: How to: Attach a Database File to SQL Server Express (http://msdn2.microsoft.com/en-us/library/ms165673.aspx).

Thanks a lot,

-Raul Garcia

SDE/T

SQL Server Engine

Thursday, March 22, 2012

Data retrieving or querying problem

Hi, I am using visual web developer 2005 express edition and Microsoft SQL 2005 to develop a fast-food ordering website and I am having trouble in retrieving data from a database table into a form. Can some one please teach me the way to write the syntax forretrieving or selecting a inserted value from the database? I have only know the syntax to insert data value from a form which is something like this:

'Create a New Connection to our daabase

Dim testAs SqlDataSource =New SqlDataSource()

test.ConnectionString = ConfigurationManager.ConnectionStrings(

"Connectionstring1").ToString'This is the SQL Insert Command

test.InsertCommand =

"Insert into Customer([Initial],[Correspondent_Name],[Correspondent_No],[Payment_Type]) VALUES (@.Initial,@.Correspondent_Name,@.Correspondent_No,@.Payment_Type)"'Each of this insert a value into the appropriate command

test.InsertParameters.Add(

"Initial", DropDownList4.SelectedValue)'This is the selected "Initial" DropDownList value

test.InsertParameters.Add(

"Correspondent_Name", TextBox10.Text)'This is the Correspondent_Name value

test.InsertParameters.Add(

"Correspondent_No", TextBox3.Text)'This is correspondent_no value

test.InsertParameters.Add(

"Payment_Type","Pay upon delivery")'This indicates that the payment is made with credit card

test.Insert()

But I have no idea the syntax to retrieve a data. Please help me with this matter as it is important to me. Thanks in advance!

Regards,

Ivan

Hi,

There are many ways to retrieve data from a database table into a form. It depends on what kind of controls would you like to bound with.

If you want to display the data in a table, the easist way is to use a GridView control and assign its DataSourceID with the SqlDataSource control's ID.

Another way is to use DataView to retrieve the set of data.eg:

DataSourceSelectArguments ar =new DataSourceSelectArguments();DataView dv = (DataView)SqlDataSource1.Select(ar);this.TextBox1.Text = dv.Table.Rows[0]["CategoryName"].ToString();

In this way you can retrieve the value of any row any column manually.

Thanks.

|||

One of the ways how can you select data from database is this:

Imports System.Data.SqlClient

Dim test As SqlConnection = New SqlConnection()
test.ConnectionString = ConfigurationManager.ConnectionStrings("Connectionstring1").ConnectionString
Dim command As SqlCommand = test.CreateCommand()
command.CommandText = "SELECT * FROM Customer"
Dim GV1 As GridView = New GridView()
test.Open()
GV1.DataSource = command.ExecuteReader()
GV1.DataBind()
test.Close()
form1.Controls.Add(GV1)

Tuesday, March 20, 2012

Data regions are not allowed inside a table detail ..

Developing using Visual Studio .Net (2003).
I have a simple table on my report showing data from a dataset. Works
fine. Displays a bunch of records.
One of the values from my dataset is a percentage value (integer from 0
to 100). I'm attempting to illustrate this using a chart. So I'm
attempting to put a chart in the table detail row. It doesn't like me
doing this, though. I get a build error:
"The chart 'chartx' is contained inside a table detail row. Data
regions are not allowed inside a table detail...".
Is there a way to do what I'm attempting with Visual Studio .Net (i.e.
SQL Server 2000 Reporting Services)? I know it can be done with Visual
Studio 2005, as that just makes you define a group expression when
attempting to "use a data region in a list".
Any help/info would be great.
Thanks.Have you tried putting it inside a matrix?
I tried putting a chart inside a table detail row, but vs didn't let me
do it "Cannot place a chart at this location in a table"
However, putting it inside a matrix works just fine.
eamon wrote:
> Developing using Visual Studio .Net (2003).
> I have a simple table on my report showing data from a dataset. Works
> fine. Displays a bunch of records.
> One of the values from my dataset is a percentage value (integer from 0
> to 100). I'm attempting to illustrate this using a chart. So I'm
> attempting to put a chart in the table detail row. It doesn't like me
> doing this, though. I get a build error:
> "The chart 'chartx' is contained inside a table detail row. Data
> regions are not allowed inside a table detail...".
> Is there a way to do what I'm attempting with Visual Studio .Net (i.e.
> SQL Server 2000 Reporting Services)? I know it can be done with Visual
> Studio 2005, as that just makes you define a group expression when
> attempting to "use a data region in a list".
> Any help/info would be great.
> Thanks.sql

Data Region/Matrix Control Wrapping Around

Hello All,

In my report, I have a Matrix control placed next to a table. It renders properly and displays data aligned in two controls in Visual Studio Preview. However, when I deploy to production, it wraps the matrix control below the table, in fact puts the entire matrix control underneath the table. Why such strange behavior and not in the Preview of the report but only in Production? Any ideas how to fix this?

In VS Env. Preview --> [Table][Matrix]

In Report Svr Prod --> [Table]

[Matrix]

Thanks,

Try making a 2 column, 1 row table with the table and matrix in the left and right cells, respectively.
Set the datasource of the table to be one of your already used datasets.|||

Do you mean in the Details or Header/Footer of the table? If I put in the details it returns with following errors dialog

Microsoft Report Designer

Cannot place a Table/Matrix at this location in the table

|||I didn't specify. I know I've received that error and have tried to place the piece in the header instead. I believe that works fine - but there's one way to find out.|||Well, I tried that but it din't work. The thing is that the table and matrix have different data sets. And the containing table can only have one data set name, that is why the report designer is complaining... May be I am missing something but it really sucks that the control renders one way in development and differently in production.|||

In my experience, Matrix reports almost always do not render properly on deployment. I do not know of any one method to fix such alignment issues, but in general try making sure that the components do not overlap even slightly with each other.

Also, try putting both inside a single rectangle, if they are not already in one.

Hope this helps,

-Aayush

|||

Yes, that worked. I use three rectangles though. One for table. Second for Matrix. The third one is the container. So, its sort of like the table header solution as suggested above by TU5 but without a table. The problem indeed was the overlapping report items --> "SSRS does not support overlapping report items in all rendering formats".

Thanks.

Data Region/Matrix Control Wrapping Around

Hello All,

In my report, I have a Matrix control placed next to a table. It renders properly and displays data aligned in two controls in Visual Studio Preview. However, when I deploy to production, it wraps the matrix control below the table, in fact puts the entire matrix control underneath the table. Why such strange behavior and not in the Preview of the report but only in Production? Any ideas how to fix this?

In VS Env. Preview --> [Table][Matrix]

In Report Svr Prod --> [Table]

[Matrix]

Thanks,

Try making a 2 column, 1 row table with the table and matrix in the left and right cells, respectively.
Set the datasource of the table to be one of your already used datasets.|||

Do you mean in the Details or Header/Footer of the table? If I put in the details it returns with following errors dialog

Microsoft Report Designer

Cannot place a Table/Matrix at this location in the table

|||I didn't specify. I know I've received that error and have tried to place the piece in the header instead. I believe that works fine - but there's one way to find out.|||Well, I tried that but it din't work. The thing is that the table and matrix have different data sets. And the containing table can only have one data set name, that is why the report designer is complaining... May be I am missing something but it really sucks that the control renders one way in development and differently in production.|||

In my experience, Matrix reports almost always do not render properly on deployment. I do not know of any one method to fix such alignment issues, but in general try making sure that the components do not overlap even slightly with each other.

Also, try putting both inside a single rectangle, if they are not already in one.

Hope this helps,

-Aayush

|||

Yes, that worked. I use three rectangles though. One for table. Second for Matrix. The third one is the container. So, its sort of like the table header solution as suggested above by TU5 but without a table. The problem indeed was the overlapping report items --> "SSRS does not support overlapping report items in all rendering formats".

Thanks.

Sunday, March 11, 2012

Data not printing from crystal report generated using parameterized query in ASP

Data not printing from crystal report (9.0) generated using parameterized query in ASP.Net (Visual Studio 2003). But data is displaying properly. Tried changing the font to printer font, but no luck.
Any ideas?
Thanks,
Narayana Murty.Is there a problem in Printer settings?
Check the network

Data not being displayed.

Hi,
I have just installed MS SQL in my computer and I am trying to run MSSQL and Visual studio for the first time. However I have run into aproblem that I can't solve. Basically the problem is that the data Ifetch from the database is not being displayed/bound to the ddl I haveon the page.
I have used VS to configure the sqlDataAdapter, DataSet, sqlConnection,and the sqlCommands. Basically the data is being fetched from theNorthwind sample database. From the preview option on thesqlDataAdapter I am able to preview the information from the database.So it seems to work. I have also configured the ddl settings so thatthe Categories table is the datasource. I have also set the ddl.DataTextField = "CategoryName"; ddl.DataValueField = "CategoryID";
When I compiled and run the page, no error messages are generated, butthe ddl is still completely blank and I can't understand why.
Does anybody know how I can solve this?? :s

Om Sri Sai Ram

Did you callDataBind method.

Thanks,

Ram

|||Hi,
I have just double-checked that I had called DataBind, and itturns out that I had. However, I had forgotten to fill the DataSet:
this.sqlDataAdapter1.Fill(this.dataSet11);
Now I get an error message:
Login failed for user 'DISABLED\ASPNET'|||Om Sri Sai Ram

Are u using windows authentication? If yes, check whether ASPNET account has pemission to access the table.
If you still have problems, post the code.
Thanks,
Ram

Thursday, March 8, 2012

data mining viewer controls.....

i'd like to add the data mining viewer controls into visual c# 's toolkit....is it possible...

is there a way how i could create forms and import the minned pattern into these forms using the data mining viewer controls?

infact i am trying to make use of the data mining viewer controls to migrate the minned results from BIDS to a form or to a web page......so what would the first step be? i have already installed the data mining viewer controls...but then i don't see any of these web controls in my toolkit...

what is my next step? is it adding these installed contrls onto the visual c# web developer toolbar?(toolkit) please correct me if i am wrong......and what would b my next step in achieving this?

Data Mining Tool

I am new to Data Mining

I downloaded the SQL SERVER 2005 Evaluation Edition.

Question:

For Data Mining which Product Edition of VISUAL STUDIO 2005 i have to download ? ,

You don't need to download/install Visual Studio 2005 separately to use the SQL Server 2005 tools. SQL Server 2005 Setup should install the VS shell components that are used by the design and management tools. Data Mining is available in the Developer, Standard and Enterprise Editions of SQL Server 2005 (the Evaluation version is Enterprise).|||

Hi Raman

WIthin Your Technet webcast 'Intro. to DM with SS2005' you used 'Visual Studio Team' to build the Data Mining demo.

Thats the reason i raised the question.

Your webcast is excellet.

Keep doing more webcase on the DATA MINING.

Thank you very much for your reply.

Rgs - Antony Kumar

|||

Thanks for the feedback, Antony.

The SQL Server design/mgmt tools are hosted in the Visual Studio 2005 shell. If you don't have Visual Studio 2005 installed, SQL Setup installs the base shell components needed. In either case, the user interface that comes up when you open up Business Intelligence Development Studio is the Visual Studio UI. (I just happened to have the full Visual Studio installed on the machine on which I showed the demo in my webcast.)

|||

Hi,

Where can I watch the 'Intro. to DM with SS20" webcast ?

Thanks,

ST

|||

You can find this webcast on-demand here: http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032289986&EventCategory=5&culture=en-US&CountryCode=US

There's also another live version of this webcast coming up on May 12, where you'll be able to ask questions via LiveMeeting:

http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032294887&EventCategory=5&culture=en-US&CountryCode=US

Wednesday, March 7, 2012

data mining

well, i;m doing a thesis about data mining right now.And i found some difficulties. In my thesis i use visual basic 6.0 and sql server 2000 database and sql server 2000 analysis service. For information i use DSO (Decision Support Objects in programming). I've read claude seidmann book about data mining and i really help with that book. But i still have some questions about data mining using DSO :
1. I have made a relational mining model using VB. I've created the code based on Claude Seidman book. well it's process well. But when i want to browse the result in analysis manager there's an error message ;

"Unable to browse the mining model, object or provider is not capable of performing requested operation"
I really don't understand with this error message. Could you tell me what's the meaning of this error message?


2. shoud i make another code in VB to browse the result ?

3. I still don't understand about Microsoft decision tree algorithm works.So could you tell me how microsoft decision tree wroks?

Thank you so much for your attention and i really appreciate with your help.Thank you

Here is some information on Decision Trees algorithm from SQL SERVER 2005 perspective.

http://msdn2.microsoft.com/en-us/library/ms175312(SQL.90).aspx

HTH..

To do a data mining project, may I recommend using Sql server 2005 and Visual Studio 2005? You could download free trial versions from Microsoft site.

ZULFIQAR SYED

HTTP://ZULFIQAR.TYPEPAD.COM

|||

It's likely that some of the client components in your Analysis Services 2000 install are not registered correctly. Re-installing the latest service pack (SP4) should fix the problem you're seeing.

Zulfiqar's reply has valid suggestions about trying SQL Server 2005 Data Mining if you're starting a new data mining project and checking the SQL 2005 Books Online for information about the decision trees algorithm. More in-depth information about the algorithm can be found in the research papers accessible from this tip: http://www.sqlserverdatamining.com/DMCommunity/TipsNTricks/986.aspx

Friday, February 24, 2012

Data Link properties don't show any istance

Hi
Data Link Properties, open by test.udl file, when open don't show any
istance of MSDE sp3 installed.
By Visual Studio.NET 2003 Server Manager I can see the server and database.
If I insert manually name istance and try test connect it return me this
message:
Test connection failed because of an error initializing provider.
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access
denied.
My system is:
Windows XP pro
Visual Studio.NET 2003
MSDE sp3
MDAC 2.8
Can you help me?
I answered your later post, regarding the same issue.
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Giuseppe Pezzella" <gpezzella@.yahoo.com> wrote in message
news:su31d.307127$5D1.13632538@.news4.tin.it...
> Hi
> Data Link Properties, open by test.udl file, when open don't show any
> istance of MSDE sp3 installed.
> By Visual Studio.NET 2003 Server Manager I can see the server and
database.
> If I insert manually name istance and try test connect it return me this
> message:
> Test connection failed because of an error initializing provider.
> [DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access
> denied.
>
> My system is:
> Windows XP pro
> Visual Studio.NET 2003
> MSDE sp3
> MDAC 2.8
> Can you help me?
>

Sunday, February 19, 2012

Data input problem

In Visual Web Developer Ihave created a data input form based on the documentation I found in the .NETFramework Class Library (SqlDataSource.InsertCommand Property). Originally my form contained 4 textboxes(FirstName, LastName, Phone, Email) and worked fine. All this data is nvarchar string data.

When I added a checkbox Iget an error that"Stringwas not recognized as a valid Boolean" when the checkbox is checked. When the checkbox is unchecked the data is input without a problem. This is a bit data field in the table.

Here is my VB code, InsertParameters for my SqlDataSource1, and button code:

<scriptrunat="server">

PrivateSub InsertData(ByValSourceAsObject,ByVal eAsEventArgs)

SqlDataSource1.Insert()

EndSub

</script>

<InsertParameters>

<asp:formParameterName="FirstName"Type="String"FormField="txtFirstName"/>

<asp:formParameterName="LastName"Type="String"FormField="txtLastName"/>

<asp:formParameterName="Phone"Type="String"FormField="txtPhone"/>

<asp:formParameterName="Email"Type="String"FormField="txtEmail"/>

<asp:formParameterName="FreeInfo"Type="Boolean"FormField="checkbox1"/>

</InsertParameters>

<asp:Buttonid="Button1"runat="server"text="Submit"OnClick="insertdata"/>

I suspect that the problemis with the VB code which will only accept string input data, but don't knowhow to fix it. Any thoughts on how tofix this problem? Thanks in advance forany help provided.

Check box return "On" whener page is postback

It does'nt return checked or unchecked.

You have to check this checkBox by code before inserting the data.

If checkBox is checked set the parametervalue = 1 else 0 .

Thank

Kunal

|||

Thanks for your feedback. I tried to implement your suggestions, but get this error message:

String was not recognized as a valid Boolean.

Here is my new VB code:

Private Sub InsertName(ByVal Source As Object, ByVal e As EventArgs)
If (CheckBox1.Checked = True) Then
CheckBox1.Equals(1)
Else : CheckBox1.Equals(0)
End If
SqlDataSource1.Insert()
End Sub

I am a newbie to VB, so my codeprobably doesn't accurately implement your recommendations. Any helpyou can provide in getting this to work will be greatly appreciated.

|||

Hi,

The formParameter always gets value from the Text property of the controls. In this case, you can try to use ControlParameter instead.

<asp:controlParameter Name="FreeInfo" ControlId="checkbox1" PropertyName="Checked"/>

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

|||

Thanks Kevin. That's exactly what I needed.

Data in Table not showing

I am just starting with Report Services, so this may be an easy or dumb
problem but here goes:
I am working in Visual Studio with a simple report based on a sproc with
several parameters that returns a result set. In the report I have set up a
table and the dataset for it, as well as the parameters. Everything works
great until I test the report, the report renders but the table shows as
having no data. I can go to the data tab and run the sproc and enter the
same parameters and I get data back.
I have checked all the places I could think of that might hide the data, but
nothing.
I'm hoping someone else has been through this or has some ideas on where I
could look.
TIA,
NancyHave you added a filter somewhere? Edit the dataset on the Data tab, click
the Filters tab and see. Also go to Properties of your table and check the
Filters tab. If your sproc returns data, the data should appear in the
report. I have a sproc in one of my reports and ti works just fine.
Charles Kangai, MCT, MCDBA
"Nancy Lytle" wrote:
> I am just starting with Report Services, so this may be an easy or dumb
> problem but here goes:
> I am working in Visual Studio with a simple report based on a sproc with
> several parameters that returns a result set. In the report I have set up a
> table and the dataset for it, as well as the parameters. Everything works
> great until I test the report, the report renders but the table shows as
> having no data. I can go to the data tab and run the sproc and enter the
> same parameters and I get data back.
> I have checked all the places I could think of that might hide the data, but
> nothing.
> I'm hoping someone else has been through this or has some ideas on where I
> could look.
> TIA,
> Nancy
>
>|||Thanks, I went ahead and I checked for filters and I can find none. I know
it must be something simple I am missing.
Any other ideas? Anyone?
TIA,
Nancy
"Charles Kangai" <CharlesKangai@.discussions.microsoft.com> wrote in message
news:53541C34-C4A7-4769-AB92-43C023605AFD@.microsoft.com...
> Have you added a filter somewhere? Edit the dataset on the Data tab, click
> the Filters tab and see. Also go to Properties of your table and check the
> Filters tab. If your sproc returns data, the data should appear in the
> report. I have a sproc in one of my reports and ti works just fine.
> Charles Kangai, MCT, MCDBA
> "Nancy Lytle" wrote:
> > I am just starting with Report Services, so this may be an easy or dumb
> > problem but here goes:
> >
> > I am working in Visual Studio with a simple report based on a sproc with
> > several parameters that returns a result set. In the report I have set
up a
> > table and the dataset for it, as well as the parameters. Everything
works
> > great until I test the report, the report renders but the table shows as
> > having no data. I can go to the data tab and run the sproc and enter
the
> > same parameters and I get data back.
> > I have checked all the places I could think of that might hide the data,
but
> > nothing.
> >
> > I'm hoping someone else has been through this or has some ideas on where
I
> > could look.
> > TIA,
> > Nancy
> >
> >
> >