tagCANDY CGI VBレスキュー(花ちゃん) の Visual Basic 2010 用 掲示板(VB.NET 掲示板)
VBレスキュー(花ちゃん) の Visual Basic 2010 用 掲示板(VB.NET 掲示板)
[ツリー表示へ]  [ワード検索]  [Home]

タイトル Re^9: バイナリデータが切り捨てられます。no
投稿日: 2007/08/27(Mon) 14:22
投稿者kokoro
> > 大事なところを読み飛ばさないでください。
> >
> > > > > 他に何が原因でしょうか?SQLのセレクト文の構文ミスとかでしょうか?
> > > >
> > > > 例外の内容を確認してください。そこに原因が書いてあります。
> >
> > 例外の内容を確認してください、と書きましたが、
> > 確認されたのですか?
> >  
> > > > 質問の仕方に関してですが、
> > > > 例外の内容も、該当箇所のソースコードの抜粋も、
> > > > やっていることの概要も記載の無い状況では、役立つアドバイスは得られません。
> >
> > ソースコードの抜粋(でも肝心なところのコードも抜けてそうですが)以外に
> > ・例外の内容
> > ・やっているのことの概要
> > 等の説明も必要ということを書いていますが、
> > その掲載もありませんね。
> >
> > 第三者が読んでわかるかどうか考えましょうとも言ってますが、
> > 自分の書いた内容を読み返しましたか?
>
> すみません。今試しに18項目の登録科目の内、2項目以外をコメント化して登録すると、最初の2項目は登録処理できました。という事はSQL文が正しくないという事でしょうか?
ソースコードは
Sql = ""
                Sql &= "INSERT INTO "
                Sql &= "個人情報 "
                Sql &= "("
                Sql &= "ID" & ", "
                Sql &= "姓" & ") "
                Sql &= "名" & ", "
                Sql &= "性別" & ", "
                Sql &= "生年月日元号" & ", "
                Sql &= "生年月日年" & ", "
                Sql &= "生年月日西暦" & ", "
                Sql &= "生年月日月" & ", "
                Sql &= "生年月日日" & ", "
                Sql &= "郵便1" & ", "
                Sql &= "郵便2" & ", "
                Sql &= "住所1" & ", "
                Sql &= "住所2" & ", "
                Sql &= "方書" & ", "
                Sql &= "TEL" & ", "
                Sql &= "携帯電話" & ", "
                Sql &= "Mailadress" & ") "
                Sql &= "VALUES "
                Sql &= "("
                Sql &= "'" & idNo & "'" & ", "
                Sql &= "'" & sei & "'" & ", "
                Sql &= "'" & mei & "'" & ", "
                Sql &= "'" & seibetu & "'" & ", "
                Sql &= "'" & seinengen & "'" & ", "
                Sql &= "'" & seinennen & "'" & ", "
                Sql &= "'" & seinentuki & "'" & ", "
                Sql &= "'" & seinenhi & "'" & ", "
                Sql &= "'" & yubin1 & "'" & ", "
                Sql &= "'" & yubin2 & "'" & ", "
                Sql &= "'" & jusho1 & "'" & ", "
                Sql &= "'" & jusho2 & "'" & ", "
                Sql &= "'" & kata & "'" & ", "
                Sql &= "'" & tele & "'" & ", "
                Sql &= "'" & keitai & "'" & ", "
                Sql &= "'" & faxNO & "'" & ", "
                Sql &= "'" & mail & "'"
                Sql &= ")"

            Else
                Sql = ""
                Sql &= "UPDATE"
                Sql &= " " & "個人情報"
                Sql &= " " & "SET"
                Sql &= " " & "ID " & "= "
                Sql &= "'" & idNo & "'" & ","
                Sql &= " " & "姓 " & "= "
                Sql &= "'" & sei & "'" & ","
                Sql &= " " & "名 " & "= "
                Sql &= "'" & mei & "'" & ","
                Sql &= " " & "性別 " & "= "
                Sql &= "'" & seibetu & "'" & ","
                Sql &= " " & "生年月日元号 " & "= "
                Sql &= "'" & seinengen & "'" & ","
                Sql &= " " & "生年月日年 " & "= "
                Sql &= "'" & seinennen & "'" & ","
                Sql &= " " & "生年月日西暦 " & "= "
                Sql &= "'" & seireki & "'" & ","
                Sql &= " " & "生年月日月 " & "= "
                Sql &= "'" & seinentuki & "'" & ","
                Sql &= " " & "生年月日日 " & "= "
                Sql &= " " & seinenhi & "'" & ","
                Sql &= " " & "郵便1 " & "= "
                Sql &= "'" & yubin1 & "'" & ","
                Sql &= " " & "郵便2 " & "= "
                Sql &= "'" & yubin2 & "'" & ","
                Sql &= " " & "住所1 " & "= "
                Sql &= "'" & jusho1 & "'" & ","
                Sql &= " " & "住所2 " & "= "
                Sql &= "'" & jusho2 & "'" & ","
                Sql &= " " & "方書 " & "= "
                Sql &= "'" & kata & "'" & ","
                Sql &= " " & "TEL " & "= "
                Sql &= "'" & tele & "'" & ","
                Sql &= " " & "携帯電話 " & "= "
                Sql &= "'" & keitai & "'" & ","
                Sql &= " " & "FAX " & "= "
                Sql &= "'" & faxNO & "'" & ","
                Sql &= " " & "Mailadress " & "= "
                Sql &= " " & mail & "'"
                Sql &= " " & "WHERE " & "("
                Sql &= " " & "ID"
                Sql &= " " & "="
                Sql &= "'" & Mid(CStr(Code), 1, 3) & "' " & ")"   '3,1

            End If


            Try
                dbUpdate(Sql)

                MsgBox(strMode & "しました", MsgBoxStyle.Information, "strMode" & "処理")
                Form3.Show()
                Me.Close()

            Catch ex As Exception
                MsgBox(strMode & "に失敗しました", MsgBoxStyle.Exclamation, strMode & "処理")

            End Try

        
        End If

- 関連一覧ツリー をクリックするとツリー全体を一括表示します)

古いスレッドにレスはつけられません。