473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

database connectivity using javascript

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 6314
dmjpro
2,476 2GB
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
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 2GB
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 Expert Mod 8TB
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
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 8TB
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 Expert Mod 8TB
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 Expert Mod 8TB
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
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...
1
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...
3
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...
8
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...
3
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...
0
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...
1
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...
4
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.