Re: writing data adapter sql commands



Armin,

I added MySqlCmdBuilder.QuotePrefix = "[" and MySqlCmdBuilder.QuoteSuffix = "]" to my form load event and like you said it works with out needing to parse the insert statement. Thanks!

Eventually I'll figure out all the tricks in .net. I hope this program is done now but every time I think it is I run into another problem.

Thanks again for the excellent help!
cj


Armin Zingler wrote:
"cj" <cj@xxxxxxxxxxxxx> schrieb

Armin, you and Cor sound like you know what your doing.  I'm pretty
new to .net.  I really don't understand why I need to set parameters
and I'm not using ADO.Net.



No, you do use ADO.Net. The SqlConnection, OdbcConnection, Oledbconnection and OracleConnection are all part of ADO.net:

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconadonetconnections.asp


What I was trying to say is that I thought your problem is not related to VB.Net. It is a more common problem, /not related/ to a specific programming language even though you are /using/ a specific language.

I think I know VB.Net quite well and I hope I can help with many VB.Net
language related problems, but ADO.Net is nothing that is related to the
language. It is a part of the Framework that can be discussed even without
any language (apart from English ;-) ). If I wanted to help people having
ADO.Net problems, I would read the ADO.Net group. Now I am reading here and
still find ADO.net specific discussions. That's why I tried to kindly point
you to the ADO.Net group.

Nevermind, we can keep on leading the started discussion /here/, of course.
:)

Perhaps this would help. Below is my entire program. Only the connection
strings have been removed for security. It isn't long. I'm sure an
expert like one of you would have no problem showing me how to fix it. I
have commented the code as best I can to show the problem area.


Please do not simply say the code is junk and suggest I try another way
completely.  To help me learn and understand what is happening I need to
see what is wrong with what I am doing.  Eventually I might find a better
way to write all this.

Thanks for your help.  Below is the code you can paste it right into a
blank windows application.


First, you should enable Options Strict. Turning off compiler checks can
lead to unnecessary faults at runtime.

I didn't analyze the code completely, but maybe all you are looking for are
the QuotePrefix and QuoteSuffix properties of the SqlCommandBuilder. If you
set

MySqlCmdBuilder.QuotePrefix  = "["
MySqlCmdBuilder.QuoteSuffix  = "]"

then you probably don't have to parse the Insertcommand. I can't test it
because I don't have an SqlServer here.


Armin

.



Relevant Pages

  • Re: Up to date MFC Book
    ... To the developers what matters is that they are comfortable with the language, ... and so is difficult for tools to parse and process ... ... parse the compiler has to do is different from the parse that a refactoring tool ... OO design principles) is that it wraps the Win32 API enough to let you do what ...
    (microsoft.public.vc.mfc)
  • Re: newbie: m-expressions
    ... > Now I can parse my language and translate it to Lisp...but if there is ... > a well thought-out standard way of doing it (I hoped M-Expressions were ... parse trees in lei of developing an M-expression syntax for production ...
    (comp.lang.lisp)
  • What does the simplified sexp-based syntax for C# looks like?
    ... language", parse it, and produce the parse tree from it, then you ... don't have to write functions such as this OCaml example. ... correct by comparing the C# AST I produce against one that I expect. ...
    (comp.lang.lisp)
  • Re: Am I parsing this correctly? (when do I build the symbol table)
    ... language, or try to approximate some other language, and in those ... easier to parse. ... Some designers choose one, some choose ... One design point is reserved words or no reserved words. ...
    (comp.compilers)

Loading