שלח תשובה

זירת השאלות

540
צפיות
4
תשובות

בעיה בכתיבת נתונים לטבלה

,‏ 1 באוגוסט, 2004

בס"ד

מישהוא יכול להגיד לי, מה הבעיה בשורות הבאות:

dim inse as string = "INSERT INTO statics (first_number, last_number, action) VALUES ('1', '2', '/')"
dim conn as new oledbconnection("provider=SQLOLEDB;data source=C:Inetpubdatabasecalc.mdb")
dim I as integer
conn.open()
dim cmd as new oledbcommand(inse, conn)
I = cmd.ExecuteNonQuery()
conn.close()


תגיות:

4 תשובות

  1. כמה בעיות…
    1. השתמשת פעמיים ב- NEW:
    conn as new
    cmd as new

    2. string, new ו- integer אלו מילות שמורות אני חושב…. (לפחות המילה string).

  2. זהר פלד הגיב:

    זה VB או VBS?
    כי ב VSB אי אפשר לעשות DIM ולתת ערך למשתנה באותה השורה, וגם אי אפשר לעשות DIM לסוג משתנה ספציפי – כל המשתנים של VSB הם VARIANT.
    חוצמזה, איזה הודעת שגיאה אתה מקבל?

  3. ע-ר הגיב:

    זה VB.NET
    בס"ד

    ואני מקבל את השגיאה הבאה:


    [DBNETLIB][ConnectionOpen (ParseConnectParams()).]‏‏חיבור לא חוקי.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (ParseConnectParams()).]‏‏חיבור לא חוקי.

  4. ע-ר הגיב:

    למישהו יש תשובה
    בס"ד

    אני לא מחפש בעיה
    אני מחפש פיתרון

שלח תשובה