VB 2005 and Databanks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new in VB 2005;
I created within a VBProject a SQL Databank as dataset - created one table
in this dataset with ID (integer) and special remarks (text) column. In a
from, I created several textboxes and according to the ID, I would like to
get the remarks from the tabel to be seen in the different textboxes. All I
tried, doesn't work.
--------------------------------------------
I did it with :ADODB Connection together with the ADODB recordset,
Dim cnn As New ADODB.Connection
Dim rst As ADODB.Recordset etc..etc.
rst.open TblName, cnn, , , 1
rst.Find "ID=1", , adSearchForward, 1
Me.form1.textbox1.text = rst.Fields("special remarks").Value etc.etc.
 
I am new in VB 2005;
I created within a VBProject a SQL Databank as dataset - created one table
in this dataset with ID (integer) and special remarks (text) column. In a
from, I created several textboxes and according to the ID, I would like to
get the remarks from the tabel to be seen in the different textboxes. All I
tried, doesn't work.
--------------------------------------------
I did it with :ADODB Connection together with the ADODB recordset,
Dim cnn As New ADODB.Connection
Dim rst As ADODB.Recordset etc..etc.
rst.open TblName, cnn, , , 1
rst.Find "ID=1", , adSearchForward, 1
Me.form1.textbox1.text = rst.Fields("special remarks").Value etc.etc.

Hallo Friedi

I think the problem is at least in the way you referred to the
controls

Try:

textbox1.text = rst.Fields("special remarks").Value

If it doesn't help, check what the Recordset did you get...

e.g.

Response.Write ("test=" & rst.Fields("special remarks").Value)
 
Why are you using ADODB Connection
(or ADODB.<anything>)
in a VS2005 project?


DataSets (.LoadDataSet)
IDataReader(s) (.ExecuteReader)

are the Ado.Net way to access data.

If you used some wizard to upgrade your code, gut it, and start over.
 
Thanks Sloan - I try that - as I said I have no experience with VB 2005 - as
the dataset is a sql dataset I tried ADODB - because that I know.
--
Friedi


sloan said:
Why are you using ADODB Connection
(or ADODB.<anything>)
in a VS2005 project?


DataSets (.LoadDataSet)
IDataReader(s) (.ExecuteReader)

are the Ado.Net way to access data.

If you used some wizard to upgrade your code, gut it, and start over.
 
"SQL Databank"...??? What's that...???

das ist ein Sprachfehler, auf Deutsch bedeutet das englische Wort
"database"
auf einfach deutsch sagt man auch "Databank" :)

but is this a problem, I think everybody understand when Germans say
something like that? :))
 
Hi Mark Rae, don't repeat what Sloan already said - it's wasting time -
instead of asking me "Why on earth are you trying to use ADODB with
..NET...???"
Tell me HOW to do it - that would be a positive input, all the rest is BS.
 
Ja danke Alexey - denke ich auch
--
Friedi


Alexey Smirnov said:
das ist ein Sprachfehler, auf Deutsch bedeutet das englische Wort
"database"
auf einfach deutsch sagt man auch "Databank" :)

but is this a problem, I think everybody understand when Germans say
something like that? :))
 
Back
Top