VB 2005 and Databanks

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.
 
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.

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)
 
S

sloan

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.
 
G

Guest

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.
 
G

Guest

"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? :))
 
G

Guest

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.
 
G

Guest

Ja danke Alexey - denke ich auch
--
Friedi


Anon User 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? :))
 
M

Mark Rae

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top