Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Wednesday, March 28, 2012

How Do Add a DB Connection to a Table in SQL Server Express using Visual Web Developer?

I'm developing using Visual Web Developer and want to have a web page that shows the contents of a table. I get the error message when testing the connection through database explorer "Login failed for user ''. The user is not associated with a trusted SQL Server connection".

The database is located on a server running IIS and has SQL Server Express installed.

u may need to change the connection string to something like

Server=ServerAddress;Database=DataBase;User ID=Username;Password=Password;Trusted_Connection=False

How Do Add a DB Connection to a Table in SQL Server Express using Visual Web Developer?

I'm developing using Visual Web Developer and want to have a web page that shows the contents of a table. I get the error message when testing the connection through database explorer "Login failed for user ''. The user is not associated with a trusted SQL Server connection".

The database is located on a server running IIS and has SQL Server Express installed.

From MS:

During a logon process to SQL server the following error may appear:"Login failed for user 'username'. The user is not associated with atrusted SQL Server connection. (Microsoft SQL Server, Error: 18452)".

The SQL server has been configured to operate in "Windows Authentication Mode (Windows Authentication)" and doesn't allow
the use of SQL accounts.

Change the Authentication Mode of the SQL server from "Windows Authentication Mode (Windows Authentication)"
to "Mixed Mode (Windows Authentication and SQL Server Authentication)".

Hope this helps

sql

Friday, February 24, 2012

How can i upload the files(any kinda) onto the database??

Hi everyone,

I am developing an web-database application using ASP.NET, C# and sql server 2000 .

In the application i want to upload different scanned files (pdf,doc,excel,jpeg,ttf,etc) onto the database.. how can i carry out this task :-?

If any one got the solution.. then, please let me know...

thanks in advance

Step 1: Use the ASP.NET file input control to let the user select a file. This is in the HTML section of the toolbox.

Step 2: Make sure that the is set correctly to support file uploads. This means settings its encType to multipart/form-data.

Step 3: Read the file details on the server side code from the Page.Request.Files property.

Step 4: From here you can then save the files to disk and just add an index to them in the database, or you can save their contents into the DB itself (as BLOBs).

Hope this helps.|||

Hey thanx man..

Will try it out.. and if any probs will ask for ur help

|||

Hi,

It really helped me.. but can u plz repeat the 2nd step.. coz.. theres a bit confusion reading that :(

|||In order to allow the uploading of files, you need to set the encType property of your form element.

Open the .aspx file in HTML view, locate the element and add

encType="multipart/form-data" inside the element.

e.g.

Essentially, this allows you to upload a combination of files and form variables.

Hope this helps.|||

Hey thanx U soo much man..

well i gonna try out this and will definitely tell u the out-put of the same.

Thanx again, and keep the good work going

|||

Hi,

I couldnt add the encType="multipart/form-data" into the file input :(

when i tried adding it to the input tag of the file, it gave an parse error,,

So, plz let me know the soln..

<form id="Form1" method="post" runat="server">
<asp:Label id="Label2" style="Z-INDEX: 102; LEFT: 386px; POSITION: absolute; TOP: 106px" runat="server"
ForeColor="Maroon" Font-Size="Medium" Font-Bold="True" Width="265px">Uploading new Employee Details</asp:Label><INPUT style="Z-INDEX: 121; LEFT: 494px; POSITION: absolute; TOP: 431px" type="file" id="File1" name="File1" runat="server">

I tried adding it in the input tag, but encountered an parse error,hope i will get the soln,,

thanks in advance


|||You need to add the encType attribute to the form element, not the input element.