473,406 Members | 2,387 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,406 software developers and data experts.

connect to access with password

15
this access file has password when you want to opened it.
After that it run the form login that had user field and password field.

How to connected to that access file using asp.net with language vb.net
Oct 14 '08 #1
2 1105
Frinavale
9,735 Expert Mod 8TB
You need to provide user credentials to connect to your Access Database in your Connection String.

Eg:
Expand|Select|Wrap|Line Numbers
  1. conString="Provider=Microsoft.Jet.OLEDB.4.0;Data " & _ 
  2. "Source=C:\Databases\mymusic.mdb; " & _
  3. "Jet OLEDB:System database=" & _
  4. "C:\Databases\system.mdw; " & _
  5. "User ID=UserX;Password=UserXPassword"
  6.  
See this article on Accessing Microsoft Office Data from .NET Applications and this walkthrough on Editing an Access Database with ADO.NET for more information.

-Frinny
Oct 14 '08 #2
ulai
15
Thanks for your help. It really help to solve my work.
But now i have a bigger problem :
I had more than 65535 records in gridview divide by 10/pages. And when i tried to export the gridview in excel on every way :
1. I disabled the allowpaging in gridview and got and error messages like : System.OutOfMemoryException Was Thrown
2. My idea is to store row in gridview to virtable per pages. I create virtable as Table. Added row to virtable from gridview/page. But its only displayed the first page of gridview. Here is the code:
For i = 1 To grView.PageCount
grView.PageIndex = i
virTable.GridLines = grView.GridLines
If (Not (grView.HeaderRow) Is Nothing) Then
virTable.Rows.Add(grView.HeaderRow)
End If
For Each row As GridViewRow In grView.Rows
virTable.Rows.Add(row)
Next
If (Not (grView.FooterRow) Is Nothing) Then
virTable.Rows.Add(grView.FooterRow)
End If
Next
virTable.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter)
Response.End()
3. I tried like number 2 but i changed the position like :
For i = 1 To grView.PageCount
grView.PageIndex = i
virTable.GridLines = grView.GridLines
If (Not (grView.HeaderRow) Is Nothing) Then
virTable.Rows.Add(grView.HeaderRow)
End If
For Each row As GridViewRow In grView.Rows
virTable.Rows.Add(row)
Next
If (Not (grView.FooterRow) Is Nothing) Then
virTable.Rows.Add(grView.FooterRow)
End If
virTable.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter)
Next
Response.End()
But it gives an error message like number 1 : System.OutOfMemoryException Was Thrown
Oct 23 '08 #3

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

Similar topics

4
by: bettina | last post by:
Hello, My domain: www.coaster.ch My database: coasters User: bettina In the programm I wrote: <?php $db_server = "www.coaster.ch";
33
by: Savas Ates | last post by:
in asp page im getting this error how can i solve it.. yesterday the codes work but i setup visual studio 6.0 now it doesnt works..
22
by: James Kupernik | last post by:
Hello everyone! I'm hoping someone can shed some light on my ever daunting mysql/php problem. I'm currently trying to get a new server up and running using apache/php/mysql. Everything runs...
3
by: Fabian Knopf | last post by:
Hi friends, i have a unix machine PC1 where a database is running ( IBM DB2 V8.1 ) . Then i have another machine PC2 i installed there also ( IBM DB2 V8.1 ). On PC2 i installed unixODBC. To...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
1
by: Daniel | last post by:
Hello everyone, I am trying to connect to a password protected Access database using: Public connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & pathDB & ";User...
3
by: asemeiks | last post by:
I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local XPPro computer I am trying connect to a Jet database on the server. If the data...
5
by: news.telia.net | last post by:
Hi! I have a question. I have installed php and mysql on an apache-server on windows and I can't connect to the server. I tried to create a database (since I am trying to learn howto). My...
2
by: Martin | last post by:
Hi all. I have a fully functional page hosted on my PC that uses PHP and connects to MySQL on my PC to generate it's code. I now have some web hosting available which includes both PHP and...
2
by: idorjee | last post by:
hi, can anyone tell me what am i doing wrong here. i'm trying to connect remotely to the MySQL database on a server (SunOS multivac 5.9 sparc SUNW,Sun-Fire-V240). i know that the username and the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
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.