Click here to Skip to main content
15,886,823 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,


I just want to know how can see the database data using javascript?
I just want to make my database as my outlook. so far I have no code and idea about this.



Thanks
Posted
Comments
[no name] 3-Jun-11 21:33pm    
Where is this database located? And why javascript? Use ASP.NET to create your pages and add javascript to make it more responsive.
Sergey Alexandrovich Kryukov 3-Jun-11 21:45pm    
What database? This question is a while big total confusion.
Please see my answer.
--SA
sharethisone 3-Jun-11 21:56pm    
Hi, I have my database(SQL) only in local.
hansoctantan 4-Jun-11 4:06am    
javascript??? how about use PHP or you can use AJAX
sharethisone 5-Jun-11 20:28pm    
can I use php in ASP.Net? 0_0

Ever heard of separation of concerns (http://en.wikipedia.org/wiki/Separation_of_concerns[^])? Loose coupling (http://en.wikipedia.org/wiki/Loose_coupling[^])? Multitier architecture (http://en.wikipedia.org/wiki/Multitier_architecture[^])?

You're trying to mix separate concerns. "Database using Javascript" is nonsense. All the articles mentioned above shouts at you: "you're thinking about the way to abuse technology"!

Such way of thinking is not going to work. I suggest you learn and analyze the following architectural design patterns:

MVVM — Model View View Model,
http://en.wikipedia.org/wiki/Model_View_ViewModel[^],

MVC — Model-View-Controller,
http://en.wikipedia.org/wiki/Model-view-controller[^]),

MVA — Model-View-Adapter,
http://en.wikipedia.org/wiki/Model–view–adapter[^],

MVP — Model-View-Presenter,
http://en.wikipedia.org/wiki/Model-view-presenter[^].
Pay attention for the motivation of those architectures. If you understand it, you would be able to create better design ideas.

—SA
 
Share this answer
 
Comments
thatraja 3-Jun-11 23:37pm    
Nice answer. But OP must think about that.
Sergey Alexandrovich Kryukov 3-Jun-11 23:41pm    
Thank you, Raja.
"But OP must think about that."? Must. No "ifs" no "buts". :-)
--SA
I have answered a similar question on last year.

database connection from javascript[^]

If you want interact with server side through client side, then see Sandeep's answer

JavaScript login page with connectivity with sql server[^]
 
Share this answer
 
Comments
Espen Harlinn 5-Jun-11 6:03am    
Nice links, my 5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900