i m on a networking which includes blogging and internal mail like system...(passing text mesage to tables)..
now m facing two probs:
M using C#.net and MYsql in 3.5 frame work:
1. Now i created a 1 database, and insert blogging details in one table and messge details in another table and user details in users's table..
any problem in storing details in one database? in future?
2. Or creating seperate databases for users ,blogs,messages...okk or gud
3.now am storing users images in one table and Videos,ADVS in server as sugggsted by one C#-corner memebr..it works cool....
but if my client want to change server any probs?
4.presently m using session and query string to view profile details: and my url is like
www.IAMSREEKANTH.com?profileid=123456 and username in session:
but , how can i code my, URL like: www.IAMSREEKANTH.COMm/username
pls help me??
Kirtan PatelPosted Jan 12, 2010, 3:37 AM
Here are Answers
----------------------
1.Yes It must be in Separate Tables if you dont do this then you will have problems in future regarding to database.
2.its better to use Single Database for all Table.
3.Its no Problem if you store file in Some Folder and URLS in database .as When you move to another Sevrer you can always Copy that Uploaded File's Folder to Another Server.
4. 4 th Question's answer i cant give because really could not understood what exactly you are trying to do .please clarify it :)
if my answer helps you then check "do you like this answer" check box :)
Kirtan PatelPosted Jan 12, 2010, 6:39 AM
for Mysql Problem Here is Solution .
While Storing URL into database you have to Encode it using HttpUtility class so that url will preserve all the slashes quotes etc ..
Here is code how to do it ..
While Storing URL into Database
-------------------------------------------------------
string origionalurl = "some url here ";
//Before inserting into datbase just encode it .
string encodedurl = HttpUtility.UrlEncode(origionalurl);
//Now Insert this Encoded url in database
While retrieving URL from Database Decode it
---------------------------------------
string URLFromDatabase = "some url we retrived from database";
string ActualURL = HttpUtility.UrlDecode(URLFromDatabase);
//Now use the URL
and Last Answer of your URL problem .you can achieve this kind of Functionality by URL Rewriting in asp.net here are
some good article regarding to it just take a look .you will get it :)
http://www.codeproject.com/KB/aspnet/urlrewriter.aspx
http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/
Thanks :-)
SreekanthPosted Jan 12, 2010, 4:21 AM
1) ...i faced some prblems while saving urls into may table:(MYsql)....my URLcolumn varchar(100) and i try to insert an imge path but i lost '//' ..in table entry? itried bith text and varchar..but???
2) 4 the question is :for eg: in sum networking sites :"Twitter"..ican go to my profile by this kind of link: eg:http://twitter/myusername ...
hows dis?
help me? pls