Tag: asp.net

Most efficient way to design database for tagging system

Im new to database design and I would like to know what is the best way to design a tagging system such as the one that stackoverflow has? I found multiple ways to design such a system on the web, but not sure which one is the most optimal.

SQL Connection Strings when deploying to a hosting service

I have the following connection strings in development using visual studio web developer 2010 express: <connectionStrings> <add name=”ApplicationServices” connectionString=”data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true” providerName=”System.Data.SqlClient” /> <add name=”ConnectionString” connectionString=”Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True” providerName=”System.Data.SqlClient” /> <add name=”DatabaseConnectionString” connectionString=”Data Source=.\SQLEXPRESS;AttachDbFilename=C:\BegASPNET\Cheeztest\App_Data\Database.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True” providerName=”System.Data.SqlClient” /> <add name=”DatabaseEntities” connectionString=”metadata=res://*/App_Code.CheeztestModel.csdl|res://*/App_Code.CheeztestModel.ssdl|res://*/App_Code.CheeztestModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;” providerName=”System.Data.EntityClient” /> What do I need […]

Fill DropDownList from database

I am new to C# and trying to populate a DropDownList based on a database value. I tried connecting to database as shown below – tested with the statement and it says connected. Can I assume this is correct? Am I on the right track? Also, how do I then select value from the table […]

effective data fetching in asp.net

I have this much: A table which used to store the “Folders”. Each folder may contain sub folders and files. So if I click a folder, I have to list the content of the folder. The table to represent the folder listing is something like the following FolderID Name Type Desc ParentID In the case […]

create sql database from sql express database

I am working on asp.net membership website. I created the membership provider automatically, and now its stored in sql express database within the solution. I want to move all the tables to sql database instead of sql express. Last night I attached the sql express database to the sql server management studio, and I was […]

Inserting a image from a url into database

Sorry for the supposedly easy question I am trying to insert a picture from a url into the database. Here alb.picture needs to be inserted. url = “https://graph.facebook.com/me/albums/?access_token=” + oAuth.Token; json = oAuth.WebRequest(oAuthFacebook.Method.GET, url, String.Empty); Albums albms = js.Deserialize<Albums>(json); foreach (Album alb in albms.data) { alb.picture = “https://graph.facebook.com/” + alb.id + “/picture/?access_token=” + oAuth.Token; FileStream […]

Stored procedure error::Invalid object name..Need help

fetching data from 2 tables in one Stored Proceure..what’s wrong with the SP below ? Its giving error as “Msg 208, Level 16, State 6, Procedure sp_GetID, Line 9 Invalid object name ‘Admin.sp_GetID’.” ALTER PROCEDURE GetID ( @ID int ) AS BEGIN SELECT ID FROM Language WHERE ID=@ID END I am altering a previously made […]

Stored proceedure not returning all rows when it should. Whats wrong?

In the Ques Table, some of the earlier added rows have AdminLangID column’s value as NULL. The following SP should return those rows too but it’s not. What is wrong? What condition do I need to add so it returns ALL the rows? I just manually set the AdminLangID of some rows, then it would […]

GUID not being generated automatically when db.submitchanges()

I have a couple of tables I ported over to a new database. Everything is exactly the same from the legacy one to the new one. The back-end code that submits the user generated data to the database is also the same. When I submit changes to the database, all of the submitted information populates […]

SessionState in own SQL Server database on windows shared hosting

My ASP.NET site is on Windows Shared Hosting. I need to keep SessionState in SQL Server on my site, and standard way is to use ASPState DB. But that DB is inaccessible on windows shared hosting, and support said that unfortunately they can’t provide me with access to that DB. Is it possible to use […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.