使用方法将整数值插入到Access数据库中. [英] Inserting the integer value in the access db using method.

查看:93
本文介绍了使用方法将整数值插入到Access数据库中.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有一个用c#.net开发的游戏,其访问数据库的字段为:


I have a Game developed in c# .net and its access db has the field as:

电子邮件ID:

名字:

SecondName:

SecondName:

手机号码:
得分:

Mobile No:
Score:

为此,我有2种形式,第一种形式是除得分以外的上述字段的用户信息,因此在我的插入查询中,我仅提供了得分以外的该字段.我只通过了score.so基本上我 希望所有这5条信息都应保存.所以我做的是,当用户给出错误答案或退出游戏或最终通过正确回答最后一个问题而获胜时,我已经给出了插入查询.当我得到一个不正常工作 错误说:查询值的数量与目标字段的数量不相同".但这会插入用户的基本信息,除了乐谱,而且每次将乐谱设为"0".我可以在其中使用方法吗?插入查询的连接代码应 可以立即编写,并可在需要时在不同情况下调用.plz紧急处理!!!!!

so for this i have 2 forms,first which consist of the user information as above field except score,so in my insert query i'm providing only this fields except score.And in second form for the game in my insert query i've passed only score.so basically i want all this 5 information should be saved.so wat i've done is i've given an insert query when the user gives the wrong answer or when he quits the game or finally he wins by giving the last question as right.This is not working properly as i'm getting an error saying:'Number of quer values and destination field are not same'.But this inserts the basic information of the user except the score,also every time it takes the score as '0'.Can i use method in this so that my connection code for insertion query should be written at once and can be called in different situation whenever required.plz assist its urgent!!!!!

谢谢大家.

 

推荐答案

谢谢您的发帖!  ;我建议您在一个MS论坛中发布您的问题,

Thank you for your post!  I would suggest posting your question in one of the MS Forum,

Data Developer Center > Data Platform Development Forums > ADO.NET Managed Providers


这篇关于使用方法将整数值插入到Access数据库中.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆