473,804 Members | 3,330 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

database connectivity using javascript

22 New Member
hi
can i connect database using (client side )javascript. pls send me a sample code.

so that it would be very much helpfull.
May 18 '07 #1
8 6339
dmjpro
2,476 Top Contributor
that means u don't want to submit the page. ..... right !!!!!!!!!!

using JS it is not possible to connnect with server side Database.
it is only possible with server side languages.
so now Q. is that how can u get response without submitting the page.
now ... a grate think u r going to learn ..... AJAX will answer ur Q.

plz try to search GOOGLE ... AJAX.
best of luck with ur new horizons.

kind regards.
dmjpro.
May 18 '07 #2
cvijaykrishna
22 New Member
that means u don't want to submit the page. ..... right !!!!!!!!!!

using JS it is not possible to connnect with server side Database.
it is only possible with server side languages.
so now Q. is that how can u get response without submitting the page.
now ... a grate think u r going to learn ..... AJAX will answer ur Q.

plz try to search GOOGLE ... AJAX.
best of luck with ur new horizons.

kind regards.
dmjpro.


i want client side database connectivity using JS is it possible .pls suggest me in this regard

with regards and thanks
cvijaykrishna
May 21 '07 #3
dmjpro
2,476 Top Contributor
without sending the request how can u get the database connectivity??? ??

is it possible?? first tell me.

kind regards.
dmjpro.
May 21 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
i want client side database connectivity using JS is it possible .pls suggest me in this regard
You can achieve this using AJAX as suggested by dmjpro. The database connectivity is via a server-side language, but it seems that everything is done client-side because the page is not refreshed. You can use javascript to make the request, the server-side language (ASP, PHP, Coldfusion, JSP, etc.) returns the response which you can deal with client-side.
May 21 '07 #5
cvijaykrishna
22 New Member
thank u very much for your guidence,i will see in that field.
with regards and thanks
vijay
May 22 '07 #6
r035198x
13,262 MVP
i want client side database connectivity using JS is it possible .pls suggest me in this regard

with regards and thanks
cvijaykrishna
Client side database connectivity with Javascript is not possible. You connect to the database using a server side scripting language. You can use Ajax to try and fool the user that you are connecting to the database using Javascript but all you will be doing is connecting to a server side script without the user realizing that that's what you are doing.
May 22 '07 #7
acoder
16,027 Recognized Expert Moderator MVP
aliasgerraj, you posted this via the Report button/link:
how i can connect SQL database in client side by ajax or java script and fill select by this
Please use the Reply button instead. Thank you.
May 31 '08 #8
acoder
16,027 Recognized Expert Moderator MVP
how i can connect SQL database in client side by ajax or java script and fill select by this
To answer your question, even though it's already been answered in this thread, JavaScript cannot access or connect to the database. You would need server-side code for this. Make a request to the server-side script which would return a response which you can use on the client-side. See an example (replace the ASP with the language of your choice). To fill the select element, either return the HTML and set the innerHTML to that, or return JSON or XML which can be parsed to get the data.
May 31 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
9124
by: Alex | last post by:
I have developed a VB application that uses Oracle 8i database for backend. The database server is on the local network. From my development machine, the application connects (via ODBC) to the database successfully. The problem is that I want to install this application on several Windows 2000 client machines that do not have Oracle client installed (hence missing all the ODBC connectivity support files/drivers). What is the minimum...
1
2444
by: harish | last post by:
I am using java applications to connect to my MS SQL Server database. I am using ODBC for database connectivity. If i am running my java applications in a remote PC and try to connect to database server, unless i login to the serer, i am unable to connect to database. If a login to database server with it's username and password, then the database is getting connected. It is not correct to login to database server for database...
3
3493
by: Niks | last post by:
Hi, I need to connect to SQL server Database using a System DSN. Can anyone tell me how to connect to SQL Server using DSN in ASP.NET (VB.Net). Using a Try Catch block. Does anyone know how to create a "filename.DSN" file. I know how to create a system DSN, but my N/W admin has asked me to create a DSN file to send him. which would be a file name with ".DSN" extension, so that he can place it on the server.
8
2043
by: David | last post by:
Hi, Could someone please xplain how to add a field to an existing SQL table in VB.Net I have added the field in the Server Explorer and it shows up when I reload the program but I cannot access the field from within my program. Is there something I need to refresh or do I need to recreate he Dataapdtors
3
10299
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database I use System.Data.Common.DBConnection and .DBCommand. How can I keep aware from connection losses (network not availeable, db-server not available...)? Are there any strategies to detect this broken connections, and how can I
0
2208
by: tarkuser | last post by:
Hai... I have problem in storing values from flash to database and to select data from a database using Javascript. First i get details of a student through flash and then sotre it to database by an jsp or asp page and same to get back the data. I have the database connectivity problem and also some errors with Javascript. Could any one help me out in this......? Thanks in Advance
1
1455
by: Elavarasi | last post by:
Is it possible to have database connection in javascript.. i dont want to access the server database.. to access the local database i am asking... bcoz when i trying to open from asp(in localhost its working but in webpage its not working) .. i cant open the local db.. thats why i choose javascript.. will it work..?? regards ela..
4
3228
by: ykhamitkar | last post by:
Hi there, I am trying to create a web based dataentry application in java applet. When I create a standalone application using applet the database connectivity works fine. However when I use same applet in web page the, connectivity doesnt work. my backend is MS Access file and I am using JDBC ODBC database connectivity. Please advice Thanks
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10571
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10326
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9143
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.