• Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrive database connection problem  RSS feed

 
gabriel terry
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone,

I have a problem when i'm trying to recive information from my local database.

Database look like in Untitled.jpg


Untitled.jpg
[Thumbnail for Untitled.jpg]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what problem is that? What have you tried, and in which way did or didn't it work?
 
gabriel terry
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i received an error when i'm trying to view data from database
error:
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes sense - the SELECT retrieves 8 attributes, so indexes like 9 and 10 are not going to work.
 
gabriel terry
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok
I also tried

Here i must recive 9.
But I can't understand why < 10.
Thank you!
 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code doesn't make much sense to me:


Since your query is "select id,lastName,firstName,mi,address,city,state,telephone from Staff..." then shouldn't tfID be getting column 1, not 2? And shouldn't tfLastName be getting column 2, not 8? Where did those numbers 2, 8, 9, 2, and 10 come from in the coding process?
 
gabriel terry
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My mistake.
I fix it now.
Thanks a lot!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!