visual studio连接到sql [英] visual studio connected to sql

查看:113
本文介绍了visual studio连接到sql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个连接到sql tbl_course和标签的组合框。我想要一个学生没有。在每个课程的例子中。在课程计算机技术员学生没有。应该是这样的:COMTECH001和计算机科学课程的学生没有。应该这样:COMSCI001。如果他从组合框中选择课程并显示学生编号,如何在每个学生注册时增加1。标签?

我不知道如何在代码中执行此操作。谢谢。

解决方案

在这个论坛上我们已经解释过使用as COMTECH001 COMSCI001 表示表格设计不良。请使用本页右上角的搜索框。



2个理由:

1)这是'不能自动增加。

2)它被限制在999(因为数字值为3位)



阅读更多:

http://msdn.microsoft.com/en-us/ library / ms186775.aspx [ ^

I have combo box that connected to sql tbl_course and a label. I want to have a student no. in every course example. In course Computer Technician the student no. should be like this: "COMTECH001" and in course Computer Science the student no. should like this: "COMSCI001". How to increment it by 1 in every student enroll if he chooses course from combo box and display the student no. in label?
I have no idea how to do this in codes. Thanks.

解决方案

Too many times on this forum we have explainded that using as COMTECH001 or COMSCI001 means bad design of table. Please, use "search" box in the right-top corner of this page.

2 reasons:
1) It''s not possible to auto-increment.
2) It''s limited to 999 (because of 3 places for numeric values)

Read more:
http://msdn.microsoft.com/en-us/library/ms186775.aspx[^]


这篇关于visual studio连接到sql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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