Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Thursday, March 29, 2012

Help with connecting to the object explorer ON Microsoft SQL Server Management Studio Expr

Hi All,

I have just installed Microsoft SQL Server Management Studio Express.. Once I did this first it was working fine, but now their is this error each time I try to connect the object explorer.. the error is as follows :-

Could not load file or assembly 'System.Data, Version=2.0.0.0, Culture=neutral publickeyToken=b77a5c561934e089' or one of its dependencies. Signature specified is zero-sized. (Exception from HRESULT: 0x80131237).

Could anybody help me with getting rid of this error. I have no clue what to do?Try closing everything, uninstall SMSS, reboot, reinstall. Make sure only necessary programs and network connections are on when you try to open SMSS again.sql

Help with connecting to SQL database and binding

I am new to .net and I am using Visual Web Developer 2005 Express with SQL Server 2005 Express. What I would like to do is connect to my SQL database (which resides in the app_data folder) and open a table and pull out a field and place it in either a textbox or label on the page. No editing or deleting. Just simple one field binding. By the way, I can do this with all the cool built-in tools of VWD, but I want to know how to do it all by hand. I would really appreciate it if someone could help me out.

nate200@.hotmail.com:

I am new to .net and I am using Visual Web Developer 2005 Express with SQL Server 2005 Express. What I would like to do is connect to my SQL database (which resides in the app_data folder) and open a table and pull out a field and place it in either a textbox or label on the page. No editing or deleting. Just simple one field binding. By the way, I can do this with all the cool built-in tools of VWD, but I want to know how to do it all by hand. I would really appreciate it if someone could help me out.

This should give you an idea, it's a very manual example, no flashy tools:

http://aspnet.4guysfromrolla.com/articles/110905-1.aspx

Roger|||

Hey thanks that helped a lot! I got the code in place but when I view the page I don't get anything in my label. Here's my code.

<

formid="form1"runat="server"><asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ ConnectionStrings:PollConn %>"SelectCommand="SELECT TOP 1 MemberNum FROM Members"></asp:SqlDataSource><asp:LabelID="Label1"runat="server"Text='<%# Bind("MemberNum") %>'></asp:Label></form>

What am I missing??

|||

nate200@.hotmail.com:

Hey thanks that helped a lot! I got the code in place but when I view the page I don't get anything in my label. Here's my code.

<formid="form1"runat="server">

<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ ConnectionStrings:PollConn %>"

SelectCommand="SELECT TOP 1 MemberNum FROM Members"></asp:SqlDataSource>

<asp:LabelID="Label1"runat="server"Text='<%# Bind("MemberNum") %>'></asp:Label>

</form>

What am I missing??

When using a data source you need to wrap a formview tag around the label, and bind the formview to the datasource.

Here's some samples of the formview tag:

http://www.asp.net/QuickStart/aspnet/doc/ctrlref/data/formview.aspx

Roger

Friday, February 24, 2012

help setting up and using SQLXML web service ?

Hi,
I have an app that connects to a remote SQL database using 1433. It
connecting using a locked down user then runs a stored procedure passing it
XML.
Roger Walter pointed me in the direction of SOAP, SQLXML web service.
I installed:
SoapToolkit 2.0
SoapToolkit 3.0
SQLXML 3.0 sp2
Now this is done i don't see any amendments to IIS (restarted) . What should
i see ?
How do i talk to the webservice ?
What should be install in services ?
Was hoping i can just pass user/pass/xml to webservice to run stored
procedures in same way i am at the moment just with slighty connection
changes.
Please help.
ScottI found this:
1.. Download SqlXml 3.0 (this test was done with Sp2 Beta 1).
2.. Run the installation program. You will need to also install the SOAP
toolkit if you want to use the SqlXml SOAP features.
3.. Open the IIS Virtual Directory Management tool under Start ->
Programs -> SqlXml 3.0 -> Configure IIS.
4.. Create a new virtual directory. Enter the information on the General
tab and the Security tab. When you go to the Data Source tab you should be
able to browse the databases on the server. If you can't then you need to
check your security settings.
5.. Turn on Allow sql= queries so that you can test your setup. Make sure
you turn this off when you are done testing.
I am finding however that i cant browse to my index page in the new virual
directory. This index page is basic aspx for login, no sql connection
required.