I can save a single quote to an Access table:
sb.Append("', '")
sb.Append(Replace(Me.txtName.Text, "'", "''"))
sb.Append("', '")
But . . . . I can't get it back out and make it single for display in
a Datagrid. Not sure where or how and I've tried everything. The
Replace Function only works in VB.NET code or SQL Server Transact-
SQL, not Access SQL:
Dim strSQL As String = "SELECT Style, StyleWebPage,
[Name], Ages, Recurring, Cost, [Begin] & '--' & [End] As Times,
Address, URL, Contact, Comments FROM tblDances ORDER BY Style ASC"
Dim myCommand As New OleDbCommand(strSQL,
myConnection)
myCommand.Connection.Open()
Dim myDataReader As OleDbDataReader =
myCommand.ExecuteReader(CommandBehavior.CloseConnection)
myDataGrid.DataSource = myDataReader
myDataGrid.DataBind()
myConnection.Close()
End Sub