我有一点时间将一个简单的SQL查询转换为LINQ查询(使用vb btw)
这是我的SQL:
SELECT USRDEFND5
FROM int_gp_employee
GROUP BY USRDEFND5
Run Code Online (Sandbox Code Playgroud)
xml看起来像这样:
<int_gp_employee>
<row>
....
<usrdefnd5>Some GUID</usrdefnd5>
</row>
</int_gp_employee>
Run Code Online (Sandbox Code Playgroud)
我尝试过LINQ的许多不同版本.我目前的陈述是:
From b In xmlFile...<row> Group b...<usrdefnd5> By b...<usrdefnd5> INTO group
当我通过生成的集合进行预测时,每条线(17000)都显示出来.
谢谢参观.
看起来根本没有调用onCreateContextMenu.在我的onCreate for ListActivity中,我有:
list = getListView();
registerForContextMenu(list);
Run Code Online (Sandbox Code Playgroud)
(我知道这是多余的,我只是通过getListView()传递相同的结果).
这是我的onCreateOntextMenu;
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
Log.d("LM", "onCreateContextMenu");
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.context_landmarks, menu);
}
Run Code Online (Sandbox Code Playgroud)
日志永远不会生成.没有人有任何建议吗?
我正在尝试调试ASP经典页面中使用的VB 6 dll.我已经得到了其他的dll工作,但其中一个尤其令我感到头疼.这个引用COMSVCSLib COM,在调试时为空.
...
Dim objContext as COMSVCLib.ObjectContext
Set objContext = GetObjectContext
...
Run Code Online (Sandbox Code Playgroud)
从asp页面编译和调用时,一切都很好,
<%
dim obj
set obj = Server.CreateObject("page_builder.glue")
obj.Login
set obj = nothing
%>
Run Code Online (Sandbox Code Playgroud)
我将'EVERYONE'添加到VB ASP调试DCOM的所有方面.
我使用IIS 6在64位计算机上以32位运行Windows Server 2003.
正如我提到的其他DLL调试正常,只是这个方面的这个方面不起作用.有什么建议?
我是Python(2.7)的新手,我对pyodbc的帮助不大.我有一个调用存储过程的脚本:
sql = "exec gen_all.dbo.rpt_trinity_total '" + startDate + "', '" + endDate + "'"
print sql
dbCursor.execute(sql)
rows = dbCursor.fetchall()
for row in rows:
print row[0], row[1]
Run Code Online (Sandbox Code Playgroud)
在存储过程结束时,我返回了传入的日期,只是为了确保调用SP,因为参数已经设置好了.一切看起来都应该有效,但当我看到应该由SP填充的表时,那里什么都没有.如果我在管理控制台中运行SP,它可以正常工作.
我试了一下,发现是该解决方案在这里,即:
dbCursor.execute("{call gen_all.dbo.rpt_trinity_total(?,?)}", (startDate),(endDate))
Run Code Online (Sandbox Code Playgroud)
但给了我相同的结果,没有.SP本身非常简单,TRUNCATE和INSERT,使用SELECT,基于传递的日期.
只是想知道是否有人可以对此有所了解.谢谢一堆.
我在生产(和开发)中有一个 sql db,但我想在内存中用于我的测试。在我的类构造函数中,我正在调用dbcontext.database.migrate()
,但内存数据库不喜欢那样。如果我从构造函数中取出它,我的测试就可以工作,但我不知道把它放在哪里供生产代码使用。
Constructor:
public ParseAndRefreshDealerData(DbContextExtensions dbContext, IAzureStorage azureStorage)
{
_dbContext = dbContext;
_azureStorage = azureStorage;
}
Run Code Online (Sandbox Code Playgroud)
有什么建议?
在我的ArrayAdapter类中,我捕获传入的上下文.然后在getView方法中,我有这个if语句:
if(m.getSide() == RED) {
v.setBackgroundColor(lc.getResources().getColor(R.color.red_bouy));
Log.d("MA", "HERE");
} else if(m.getSide() == BLACK) {
v.setBackgroundColor(lc.getResources().getColor(R.color.black_bouy));
}
Run Code Online (Sandbox Code Playgroud)
(lc是我从构造函数中获取的上下文)
如果我只使用Color.red,它可以找到.我见过的所有例子都使用ghet getResources ...,但是来自一个活动.
有什么建议?
android ×2
.net ×1
asp-classic ×1
c# ×1
contextmenu ×1
dll ×1
ef-core-3.0 ×1
iis-6 ×1
linq ×1
listactivity ×1
pyodbc ×1
python ×1
sql ×1
unit-testing ×1
vb.net ×1
vb6 ×1
xml ×1