如何在Windows中开始编程?(How to start programming in Windows? [closed])
我用简单的编译器在C和C ++中编写了简单的程序(在大学学过;我是统计学生)。 此外,我是业余PHP程序员。 现在我想开始编程Windows。
- 带用户界面的应用程序
- 没有用户界面的应用
我的目的是看看它是如何完成的。 我可能会制作一个基本的应用程序,与Web服务器中的数据库进行交互。
我应该从哪里开始? Windows Visual Studio? 。净? 我应该知道什么?
I've made simple programs in C and C++ with simple compilers (learned it in university; I'm Statistics student). Also I'm amateur PHP programer. Now I want to start programming for Windows.
- apps with user interface
- apps without user interface
My aim is just to see how it is done. And I might make a basic app that interacts with a database which is in a web server.
Where should I start? Windows Visual Studio? .NET? What should I know?
原文:https://stackoverflow.com/questions/5125431
最满意答案
ExecuteNonQuery
- 返回受影响的行数。SqlCommand comm; // other codes int numberOfRecords = comm.ExecuteNonQuery();
ExecuteNonQuery
- returns the number of rows affected.SqlCommand comm; // other codes int numberOfRecords = comm.ExecuteNonQuery();
相关问答
更多-
ExecuteNonQuery - 返回受影响的行数。 SqlCommand comm; // other codes int numberOfRecords = comm.ExecuteNonQuery(); ExecuteNonQuery - returns the number of rows affected. SqlCommand comm; // other codes int numberOfRecords = comm.ExecuteNonQuery();
-
在C#中如何使用ExecuteNonQuery从存储过程获取返回值(In C# how to get return value from stored procedure using ExecuteNonQuery)[2023-01-09]
您需要一个Direction设置为ParameterDirection.ReturnValue 就像是: SqlParameter returnParameter = deleteCommand.Parameters.Add("RetVal", SqlDbType.Int); returnParameter.Direction = ParameterDirection.ReturnValue; ... deleteCommand.ExecuteNonQuery(); ... int returnValue ... -
NPGSQL CURSOR移动所有受影响的行(或行数)(NPGSQL CURSOR MOVE ALL getting affected rows (or row count))[2022-07-12]
这可能正在发生,因为您正在尝试获取多语句命令的受影响的行数 - 您的第一个语句创建了光标,第二个语句实际上移动了它(尽管我不确定“受影响的行”在简单时会意味着什么移动光标,而不是提取)。 尝试使用两个不同的命令发送语句,然后获取第二个命令的受影响的行。 除此之外,在这里使用游标的任何特殊原因而不仅仅是执行SELECT COUNT(*) FROM public."table" ? This is probably happening because you're trying to get the affec ... -
为什么ExecuteNonQuery返回1,即使没有更新?(Why does ExecuteNonQuery return 1 even if nothing was updated?)[2022-02-27]
对于ExecuteNonQuery返回1 , 必须有一个记录WHERE id = '6' 。 现在,如果您只想更新该行,如果该值不同,则更改该查询: UPDATE messages SET Unread = 'N' WHERE id = '6' AND Unread <> 'N' 如果您要运行该查询并且Unread的值已经是'N'那么它将返回0行。 For ExecuteNonQuery to return 1 there must be a record WHERE id = '6'. Now, if ... -
对于受SqlCommand.ExecuteNonQuery影响的行,EF等效(EF eqivalent for rows affected of SqlCommand.ExecuteNonQuery)[2021-10-24]
那么,事实上,可以通过调用ObjectContext.SaveChanges()来推断受影响的行的确切数量。 如果你看看ObjectContext.SaveChanges文档,你会看到: public int SaveChanges() 返回值:调用SaveChanges时处于已添加,已修改或已删除状态的对象数。 “SaveChanges在一个事务中运行,SaveChanges会回滚这个事务,并且如果任何一个脏的ObjectStateEntry对象不能被保存,就会抛出一个异常。” (1)和(2)基本上意味着 ... -
比较受影响的行数(Compare Number of Rows affected)[2023-06-28]
ExecuteNonQuery仅用于插入,更新或删除查询。 因此,您必须在查询中使用COUNT并使用ExecuteScalar或使用ExecuteReader和读者的HasRows属性。 Using var reader = cmd2.ExecuteReader() If reader.HasRows Then ' ... Else ' ... End If End Using ExecuteNonQuery : 对于UPDATE,INSERT和DE ... -
可以通过以下方式有效且简单地实现: select * from mytable where column3="a_variable" and status != 2; update mytable set status=2 where column3="a_variable"; 第一个查询的结果是要更改的行,第二个查询实际更改它们。 如果这是一个高性能系统,您可能需要特别注意事务,以防止新行在这两个查询之间滑动。 It can be efficiently and simply achieved wi ...
-
即使执行成功,ExecuteNonQuery也会返回-1(ExecuteNonQuery returns -1 even though the execution was successful)[2021-11-07]
你也可以检查程序,看看有没有这行代码 - SET NOCOUNT ON 这将导致ExecuteNonQuery始终返回-1。 You can also check the procedure to see if there's this line of code in there - SET NOCOUNT ON This will cause the ExecuteNonQuery to always return -1. -
mysql_info - 获取有关最新查询的信息 $recent = mysql_info(); 有用的实现示例 mysql_info — Get information about the most recent query $recent = mysql_info(); Useful implementation Example
-
ExecuteNonQuery();(Error on ExecuteNonQuery();)[2022-10-14]
当您尝试将某些内容插入到该列太长的列中时会发生这种情况。 例如,当您有一个列VARCHAR(10)并且您尝试插入值"ABCDEFGHIJKLMNOP" 。 这将导致数据被截断并产生错误。 我不知道它在你的情况下是哪一列,但它必须是Username , Password或Email 。 This happens when you try to insert something into a column that is too long for that column. For example, when y ...