|
-
Mar 25th, 2004, 06:39 AM
#1
Thread Starter
Lively Member
DB Connectivity with SQL Server using OleDb
DB Connectivity with SQL Server using OleDb : [IIS and DB are on different machines.]
<%@ Page Language="VB" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim conTest As OleDbConnection
Dim cmdTest As OleDbCommand
Dim rdrTest As OleDbDataReader
conTest = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Server=IP Address of DB Server;Database=DB Name;User ID=uname;Password=pwd;Integrated Security=SSPI")
conTest.Open
cmdTest = New OleDbCommand ( "select * from tblAdmin", conTest)
rdrTest = cmdTest.ExecuteReader
gridTest.DataSource = rdrTest
gridTest.DataBind
rdrTest.Close
cmdTest.Dispose
conTest.Close
End Sub
Errors occurred :
[OleDbException (0x80040e21): •¡”ƒXƒeƒbƒv‚Ì OLE DB ‚Ì‘€ì‚ŃGƒ‰[‚ª”_¶‚µ‚Ü‚µ‚½BŠe OLE DB ‚Ìó‘Ô‚Ì’l‚ðŠm”F‚µ‚Ä‚_‚¾‚³‚¢Bì‹Æ‚ÍI—¹‚µ‚Ü� ��¹‚ñ‚Å‚µ‚½B]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.CreateProviderError(Int32 hr) +23
System.Data.OleDb.OleDbConnection.CreateProvider(OleDbConnectionString constr) +107
System.Data.OleDb.OleDbConnection.Open() +203
ASP.test_oledb_sqlserver_aspx.Page_Load(Object sender, EventArgs e) +41
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
Please kindly suggest some solution.
Regards
Mahesh
Everybody is always learning something new ! 
-
Mar 29th, 2004, 06:12 PM
#2
I wonder how many charact
As long as you understand OLEDB is not performance optimized for MS SQL SERVER...
I think your connection string is incorrect:
Code:
conTest = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Server=IP Address of DB Server;Database=DB Name;User ID=uname;Password=pwd;Integrated Security=SSPI")
-
Mar 30th, 2004, 04:33 AM
#3
Thread Starter
Lively Member
File Handling
Hi
Thanks, db connectivity problem has been solved.
Now trying file handling [csv file] from asp.net.
There is one csv file and I am trying to open that file, read contents and display in dropdownlist web control.
Can u suggest something.
Thanks
Mahesh
Everybody is always learning something new ! 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|