Hi
I have 2 mode for open db
'Path DB
Private Const pathDB As String = "C:\...\diabolik.mdb"
'for the ole db
Private conn As New OleDbConnection
'for th sqlconnection
Private connRS As Data.SqlClient.SqlConnection
If I want open Local DB using a path and not using DNS
because I doen't know the mode.
For OleDbConnection I write :
conn.ConnectionString = _
"Provider = Microsoft.Jet.OLEDB.4.0;Data Source =" & pathDB
where is the method for open connection to local db
using your path and not dns string or othen
connRS.ConnectionString = _
"Server=(local);Initial Catalog=diabolik;" & _
"Data Source=(" & pathDB & ")"
but doen't work
I want know if possible using sqlconnection passing
path of DataBase ????!!!!!
HELP ME PLEASE
NEODEV
Fabio Santini 2 2064
Fabio,
Sqlconnection is for working with Microsoft SQL Server databases, not Access
databases.
Kerry Moorman
"neodev" wrote: Hi I have 2 mode for open db
'Path DB Private Const pathDB As String = "C:\...\diabolik.mdb" 'for the ole db Private conn As New OleDbConnection 'for th sqlconnection Private connRS As Data.SqlClient.SqlConnection
If I want open Local DB using a path and not using DNS because I doen't know the mode.
For OleDbConnection I write : conn.ConnectionString = _ "Provider = Microsoft.Jet.OLEDB.4.0;Data Source =" & pathDB
where is the method for open connection to local db using your path and not dns string or othen
connRS.ConnectionString = _ "Server=(local);Initial Catalog=diabolik;" & _ "Data Source=(" & pathDB & ")"
but doen't work I want know if possible using sqlconnection passing path of DataBase ????!!!!!
HELP ME PLEASE
NEODEV Fabio Santini
OK thank Ops
but Anothe question a want fill grid with data from access
sql = "SELECT * FROM albi where RIFAnno= " & RIFAnno
If conn.State = Data.ConnectionState.Closed Then conn.Open()
cmd1 = conn.CreateCommand
cmd1.CommandText = sql
rd1 = cmd1.ExecuteReader()
gridAlbo.DataSource = rd1
gridAlbo.databind()
but vs 005 beta2 give me error in gridAlbo.databind()
DATABIND NOT IS A METHOD
ANY IDEA
thanks
fabio This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: LP |
last post by:
Hello,
Here's the scenario:
Object A opens a Sql Db connection to execute number of SqlCommands. Then it
needs to pass this connection to a constructor of object B which in turn
executes more...
|
by: Bob |
last post by:
In our new .NET web applications, we try to limit the use of SqlConnection
to just one instance per page, even if there are multiple accesses to
various queries. The thinking behind is that this...
|
by: Victor |
last post by:
Hi Guys I have a problem here.
I want to improve the performance for a website. When I looked into the
system, I have found that the system made the "SqlConnection Object" static.
That mean only...
|
by: JoeW |
last post by:
I normally use SqlConnection, SqlDataReader, SqlCommand for most of my
queries but recently a friend of mine who is a long time java
programmer suggested I use the IDbConnection, IDbCommand...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |