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...
ok all seems to be going well.
this is the last problem that i seem to be having.
thanx for your help so far.
any suggestions?
Public Sub AddInfo(ByVal AddItem As Object)
Dim myType As Type = AddItem.GetType
Try
Dim Connect As String =...
i frequently run into using a reserved name on accident
recently is was indicators(reserved)
we sell weight indicators
these are some examples from a recent project i have worked on. maybe they will help you out.
i mostly use access(for the cost reasons) for my databasing so this might be the...
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...
i have several classes that i have created
customer
job
material
truck
each class has a bunch of different properties
what i would like to do is create a generic database connection that i could use to update, retreive, delete, or add to the database.
now the question is how do i do this the...
ok last item. the password name seems to be reserved by SQL.
once i changed the field name in access to passcode it works just fine.
this is the final code for now, until i learn to use sql params
Dim connect As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPath
Dim conn As...
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
ok i'm not sure what's wrong now.
i am lookin at the data that is being imported into the database.
i thought i would just see if i was having a problem with the data that was being entered or if there was a problem with the code behind it.
well it looks like there is a problem with the code...
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...
i am trying to save a text string that has been hashed using sha1 service provider.
when i try to store the hash to the database i get a sql error stating
"Syntax Error In UPDATE Statement"
yet i am using the exact same lines of code to do updates else where in the program.
my only clue is the...
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.
i am trying to save a text string that has been hashed using sha1 service provider.
when i try to store the hash to the database i get a sql error stating
"Syntax Error In UPDATE Statement"
yet i am using the exact same lines of code to do updates else where in the program.
my only clue is the...
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.