object does not match target type
but......................
if i change mytype to AddInfo then (sweet) it works
You guys are my hero's
everytime i have problems you are there to help out and point me in the right direction.
chmohan
i sat up last night thinking about what you told me to do.....
but still i don't understand.
everytime i try to do what you want i get integer cannot but 1 dimensional array.
Glad to hear it.
i find that i forget to look and see what names/words i'm using and depending on if i'm using msaccess or sql it always gets me into trouble.
C:\Documents and Settings\DaveEJr\My Documents\Visual Studio Projects\testapp\DBGeneric.vb(90): Value of type 'Integer' cannot be converted to '1-dimensional array of System.Object'.
i guess that's what i thought i was doing with (i) already at the begining of my for loop.
i guess i don't...
ok, now what you should do is use access and create a query just like what you want and test it there.(you'll have to make up some of the data but in sql view that should be ok.)
i'm willing to bet it's a simple punc. error.
also these words are reserved
Reserved Words...
no, i've been here several times to see what i'm missing. but i don't see it.
according to what i see there what i have now should work correctly.
i can change myType to myPropInfo or myPropertyInfo and i still get the same errors.
if i don't use an index i will get does not accept arguments...
...OleDbDataAdapter
Dim tblName As String = "tbl" & myType.Name.Substring(3)
adapter.SelectCommand = New OleDbCommand("SELECT * FROM " & tblName, Conn)
Dim cmdbuilder As OleDbCommandBuilder = New OleDbCommandBuilder(adapter)
Conn.Open()...
ok so far so good. the link you provided was fantastic.
but.......
i need to make it so that i can substitute in the table name that is taken from my class
Dim myType As Type = AddItem.GetType
Dim tblName As String = "tbl" & myType.Name.Substring(3)
Dim cRow...
...Source=" & DBPath
Dim conn As New OleDbConnection(connect)
Dim adapter As New OleDbDataAdapter
Dim sqlString As String = "SELECT * FROM tblEmployees"
adapter.SelectCommand = New OleDbCommand(sqlString, conn)
Dim cmdBuilder As New OleDbCommandBuilder(adapter)
Dim BarCodeUpdate As New Database...
sorry the password field is the item i have been having problems with since the begining.
so....... this time i just tried to imput some text into it.
nothing do difficult for it. but i still have a problem
syntax error in update command
...& DBPath
Dim conn As New OleDbConnection(connect)
Dim adapter As New OleDbDataAdapter
Dim sqlString As String = "SELECT * FROM tblCashier WHERE Employee = " & Chr(34) & Cashier & Chr(34)
adapter.SelectCommand = New OleDbCommand(sqlString, conn)
Dim...
i'm not sure how this is going to help me but i'm going to ask some more questions first.
I am connecting to an access database, in this example you are telling me to do a sql connection. is this correct?
i have never used a connection like your describing so some of the terms your using do not...
...& DBPath
Dim conn As New OleDbConnection(connect)
Dim adapter As New OleDbDataAdapter
Dim sqlString As String = "SELECT * FROM tblEmployees"
adapter.SelectCommand = New OleDbCommand(sqlString, conn)
Dim cmdBuilder As OleDbCommandBuilder = New...
i guess i don't understand. i've done some looking here on tek tips and i keep seeing the same things over and over again.
use ado.net parameter objects, but i never see and example.
i will do some more looking on the web but any help or examples you can give me would be great.
As a side note...
well i looked for any ' and " and replaced = with nothing
and i still cannont get the update command to work.
when i look at it with a stop point in place this is the text i get from the watch window
2jmj7l5rSw0yVb/vlWAYkK/YBwk=
i don't beleive this should so hard to do.
basically i copied...
well i did some more lookin and i didn't see any funny char added although there is an = at the end of every string.
i guess i will try to remove that and see if that helps, but i don't beleive that should make a difference.
...& DBPath
Dim conn As New OleDbConnection(connect)
Dim adapter As New OleDbDataAdapter
Dim sqlString As String = "SELECT * FROM tblEmployees"
adapter.SelectCommand = New OleDbCommand(sqlString, conn)
Dim cmdBuilder As OleDbCommandBuilder = New...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.