الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

how to connect sql server 2005 to jsp and servlet

مغلق
بدأه yousfecs في 12 يونيو 2007 · 4 رد · 2,735 مشاهدة · في JavaEE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

i have a big problem

i work on odbc/jdbc

i face some problem with it

i downloaded jdbc 1.1 and 1.2

and made enable for tcp/ip

and nothing can response with

plz ined reply quickly

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

String connectionUrl = "jdbc:microsoft:sqlserver://127.0.0.1;databaseName=Examination_System;";

conn = DriverManager.getConnection(connectionUrl);

#2

ممكن تبعت لي الكلاس او الكود كله وياريت تبعت لي الايرور اللي بيظهر

#3

why not working through Datasource directly by adding a DSN in you control panel ??

#4

try this out

i'm using integrated security feature and copied the sqljdbc_auth.dll file from the JDBC driver directory to the same directory of the .class file

my DB Name is test

import java.sql.*;
import com.microsoft.sqlserver.jdbc.*;


public class SqlJdbcTest
{
   public static void main(String[] srg)
   {
	   try
	   {
			  Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			String connectionUrl = "jdbc:sqlserver://localhost;database=test;integratedSecurity=true;";
			Connection con = DriverManager.getConnection(connectionUrl);
			System.out.println("Connection Established successfully");
	   }
	   catch (Exception e)
	   {
	   	System.out.println(e.getMessage() ); 
		   //e.printStackTrace();
		}
}
}

تم تعديل هذه المشاركة بواسطة ahmed_eltalkhawy في 18 أغسطس 2007 في 13:36

sign2.gif

رحم الله امرىء أهدى لى عيوبى

سبحان الله و بحمده سبحان الله العظيم

#5

اكتب البورت بتاع قاعدة البيانات ، و جرب و قولى

بس انا انصحك ما تستخدم الـ sql server استخدم الـ mysql هى اسرع مع الجافا

و بالتوفيق

هذا الموضوع مغلق.

مواضيع مشابهة