Search: | |||||

| ||||

Home » Forum » Asp.net | RSS Feeds |

I'm checking out the new tool to develop in ASP but having a slight

problem. Can't seem to connect to my MS Access database. What gives.

Sub btnRetrieve_Click(sender As Object, e As EventArgs)

Dim Conn As New ADODB.Connection

Dim sql As String

Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _

"Persist Security Info=False;" & _

"Data Source = c:\Translation\database\Translation.mdb"

Conn.Open

sql = "SELECT DocumentText FROM Document WHERE DocumentTitle

='Test2'"

Set RSTranslation = Conn.Execute (sql)

txtUntrans.text = RSTranslation

End Sub

There is other stuff wrong but I notice this right off

the bat:

> sql = "SELECT DocumentText FROM Document WHERE

> DocumentTitle

> ='Test2'"

Should be:

WHERE DocumentTitle=" & "'" & "Test2" & "'"

Also, not sure if Classic ADO works and you need to

play with what your storing the results in and how to

use it.

The line that he was using (below) would work just fine.

sql = "SELECT DocumentText FROM Document WHERE DocumentTitle ='Test2'"

I was thinking that Test2 was a

control, but then, goes to show how much I know. In

.NET you can assume the default property of a control,

you have to reference it, like, Me.Test2.Text.

correct?

Didn't find what you were looking for?
Find more on Web Matrix & MS Access
Or get search suggestion and latest updates.

Related Topics:

- MS-access database
- dealing with dates, MS Access and SQL
- How can I connect to Ms.Access in Linux with Java
- JDBC and MS Access
- how to retrieve the data from Ms Access into a JList
- Graph program does not work with data from Access via MS Query
- create a report on ms-access
- matrix
- read a matrix of size 5x5,
- sparse matrix and linked lists
- how to print a matrix into File.
- Matrix and pattern programs in PHP
- matrix operations
- Iteration to Solve Ax=b With Input Matrix
- parallel matrix multiplication using multi-threading
- matrix
- Strassen`s Matrix Multiplication algorithm
- Sparse Matrix Multiplication
- matrix
- inverse of matrix.
- Average of numbers ; matrix
- About array matrix function
- About the Matrix size when use minverse function
- PRINTING DATA IN MATRIX FORMAT
- Spearman Rank Correlation Matrix