|  | 
	                
 
  
    |  |  
    | 
        
        : ใช้ IIS กับ ASP แล้วโปรแกรมแจ้งข้อผิดพลาดว่า Microsoft OLE DB Provider for ODBC Drivers error '80040e07'     |  
    |  |  
 
              
  
    | 
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ถูกต้องแล้วครับ ตรวจสอบพวก Data Type ให้ถูกต้องครับ เช่น String จะต้องมี 'xx' , Number จะต้องมีตัวเลขเท่านั้น ส่วน Date ก็จะต้องเป็น #Date# 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 17:51:27 | By :
                            mr.win |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ก็ใช่อยู่มันเออเร่อแต่ความหมายว่า ถ้าเราตั้ง ดาต่าไทย์เป็น number แล้วเวลาเขียนน จะเขียนยังไงไม่ให้เออเร่ออยย ยกตัวอย่างมาหั้ยดูหน่อยจ้า
 
 เพราะลงข้อมูล number ยังไง ก็ เออ เร่อ
 Code (ASP)
 
  				x="insert into xx(id,name1,food,point)values ('"&request("id")&"','"&request("name1")&"','"&request("food")&"','"&request("point")&"' )"
 point เป็นข้อมุลชนิด number
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 19:08:49 | By :
                            zxc |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | Code (ASP) 
 x="insert into xx(id,name1,food,point)values ("&request("id")&",'"&request("name1")&"','"&request("food")&"',"&request("point")&" )"
 ถ้าเป็น Number จะต้องไม่มี ' '  ครับ
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 19:39:53 | By :
                            mr.win |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | ขอบคุณค่ะพี่สุดหล่อ 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 19:59:33 | By :
                            zxc |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 
 [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
 
 /foods1.asp, line 21
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 20:10:48 | By :
                            zxc |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | Code (ASP) 
 Response.write x
 
 เอาค่าตัวแปรมาดูหน่อยครับ
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 20:14:45 | By :
                            mr.win |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | Code (ASP) 
 <%  sub input()
  if request ("id")<>" " then
			 					x="insert into xx(id,name1,food,point) values('"&request("id")&"','"&request("name1")&"','"&request("food")&"',"&request("point")&")"
								Response.write x
						'set rs=cc.execute(x)
 
 
 
 ผลลัพธ์
 insert into xx(id,name1,food,point) values('','','',)
 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 20:20:00 | By :
                            zxc |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | คุณน่าจะได้คำตอบแล้วน่ะครับ ว่า Error เพราะอะไร 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 20:37:21 | By :
                            mr.win |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              | รู้!! แต่มันทำไม่ได้ อยากทำแค่ไหนทำอย่างไรฉันก็ทำทำไม่ไหว 
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-01 20:43:51 | By :
                            zxc |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  
 
        
          |  |  |  |  |  
          |  |  | 
            
              |  
 |  
              | 
                
                  |  |  |  |  
                  |  | 
                      
                        | Date :
                            2013-09-02 06:07:38 | By :
                            mr.win |  |  |  
                  |  |  |  |  |  |  |  
          |  |  |  |  |  |  |